ALLDAT page# 0001 next
2: COMMENT ⊗   VALID 00040 PAGES
3: C REC  PAGE   DESCRIPTION
4: C00001 00001
5: C00005 00002    DATA AREA FOR SAUNDERS DISK SERVICE - JAM 10-20-69
6: C00009 00003    BEGIN DSKDAT
7: C00015 00004    DSKDDB: THE DUMMY DEVICE DATA BLOCK IS THE FIRST ONE IN THE CHAIN.
8: C00019 00005    ↑HA:    0
9: C00023 00006    ↑D2INT: 0                               JSR HERE FROM 144
10: C00025 00007    MORE DATA FOR D2CHN
11: C00026 00008    BEGIN DPYDAT
12: C00028 00009       NOW THE DPY PROGRAM HEADERS.  
13: C00036 00010    ↑STRTBL:BLOCK DPYNUM    THIS TABLE, INDEXED BY DISPLAY NO.,
14: C00039 00011     DATA DISK DATA STORAGE
15: C00046 00012    BEGIN DTCDDB
16: C00048 00013    UNIT←DTCNUM-1
17: C00049 00014    TEMPORARY STORAGE FOR DECTAPE SERVICE
18: C00052 00015    IFN FTDISK,<
19: C00054 00016    BEGIN LPTDDB
20: C00056 00017    BEGIN XGPDDB    ↔ SUBTTL DATA STORAGE FOR XGP SERVICE
21: C00064 00018    BEGIN PTRDDB -- PAPER TAPE READER DEVICE DATA BLOCK
22: C00065 00019    BEGIN PTPDDB -- PAPER TAPE PUNCH DEVICE DATA BLOCK
23: C00069 00020    BEGIN SCNDDB
24: C00072 00021    FOLLOWING ARE DEFINITIONS OF THE RELATIVE BUFFER PARAMETER WORDS:
25: C00075 00022    SCANNER DEVICE DATA BLOCK.
26: C00078 00023    ↑LINSAV: 0
27: C00079 00024    DIALER DATA AREA
28: C00080 00025    BEGIN MTCDDB  --  DEVICE DATA BLOCK FOR MAG TAPES.
29: C00081 00026            UNIT←MTCNUM-1
30: C00083 00027    BEGIN SPWDAT -- DATA FOR SPACEWAR
31: C00084 00028    SCHEDULER DATA AREA . . .
32: C00088 00029    SHARABLE DEVICE REQUEST TABLE(GENERALIZED FOR OTHER QUEUES TOO)
33: C00090 00030    DATA AREA FOR CORE MANAGEMENT SYSTEM
34: C00092 00031    FREE STORAGE PARAMETERS
35: C00095 00032    SPARE LIST CONTROL BLOCKS
36: C00097 00033    BEGIN TVDDB -- TV CAMERA DEVICE DATA BLOCK
37: C00098 00034    IFN ELFNUM <SUBTTL ELFDDB - PDP-11 BARE MACHINE MODE
38: C00099 00035    BEGIN ADDDB -- DEVICE DATA BLOCK FOR A/D AND D/A.
39: C00101 00036    BEGIN ADCDDB - NEW AD/DA CONVERTER - (JAM 2-5-74)
40: C00104 00037    BEGIN APRDAT    ↔       SUBTTL  APRDAT 7 NOV 68 APRSER DATA
41: C00113 00038    ↑SYSBEG←←.              HERE TO SYSEND ZEROED AT RELOAD OR INITIALIZATION
42: C00124 00039            DATA AREA FOR PARITY SERVICE
43: C00126 00040     STATISTICS COUNTERS
44: C00132 ENDMK
45: C⊗;
    ALLDAT page# 0002 next  prev
47: SUBTTL DATA AREA FOR SAUNDERS DISK SERVICE - JAM 10-20-69
48: ;TEMP STORAGE &C. FOR DSKSER
49: 
50: DSKADR←←14B18          ;3330 DEVICE ADDRESS
51: TRKCYL←←=19            ;TRACKS PER CYLINDER
52: SNSLEN←←=24            ;NUMBER OF SENSE BYTES
53: BKPTRK←←1              ;1 BLOCK PER TRACK FOR NOW
54: RCPBLK←←22             ;NUMBER OF RECORDS PER BLOCK
55: FPACKS←←3              ;NUMBER OF FILE SYSTEM PACKS;
56: UPACKS←←1              ;NUMBER OF USER DISK PACKS
57: NPACKS←←FPACKS+UPACKS  ;NUMBER OF PACKS (INCLUDING SWAPPING/UDP PACK)
58: 
59: SECSIZ←←40             ;WORDS/DISK SECTOR
60: RECSIZ←←200            ;RECORD SIZE
61: RECWSH←←7              ;RECSIZ LOG 2
62: CRMAX←←RCPBLK+1        ;TOTAL RECORDS PER BLOCK (INCLUDING RETRIEVAL)
63: BKPGRP←←2*20           ;16 WORDS OF HALFWORD PTRS.
64: BKDSIZ←←RECSIZ*RCPBLK  ;BLOCK DATA AREA SIZE
65: BLKWDS←←BKDSIZ+SECSIZ  ;TOTAL BLOCK SIZE (INCLUDING RTVL).
66: RCPGRP←←RCPBLK*BKPGRP  ;RECORDS/GROUP.
67: RCPTRK←←BKPTRK*CRMAX   ;NUMBER OF RECORDS PER TRACK INCL. RETRIEVAL
68: 
69: 
70: NSATBK←←1              ;NUMBER OF BLOCKS NEEDED FOR SAT TABLE.
71: 
72: ;PACKAD IS A TABLE THAT CONTAINS THE LAST LEGAL PHYSICAL TRACK NUMBER FOR
73: ;ANY GIVEN DISK PACK.
74:         -1              ;FOR REFERENCE TO PACKAD-1
75: PACKAD:
76: RADIX =10
77: ZZZ←←0                  ;PACK NUMBER
78: TTRK←←0                 ;TOTAL TRACKS SO FAR
79: FOR @' I IN (800,800,800,800) <
80: CAT(NCYL,\ZZZ)←←I                      ;NUMBER OF CYLINDERS FOR THIS PACK
81: CAT(NTRK,\ZZZ)←←I*TRKCYL               ;NUMBER OF TRACKS FOR THIS PACK
82: CAT(TTRK,\ZZZ)←←TTRK←←TTRK+I*TRKCYL    ;TOTAL TRACKS
83: ZZZ←←ZZZ+1
84:         TTRK-1                          ;LAST LEGAL TRACK IN THIS PACK
85: >
86: IFN .-PACKAD-NPACKS,<
87:         .FATAL NPACKSNUMBER OF PACKS AT PACKAD
88: >
89: 
90: NXTRA0←←11             ;NUMBER OF EXTRA CYLINDERS ON PACK 0
91: 
92: RADIX 8
93: 
94: LSTBIT←←CAT(TTRK,\<FPACKS-1>)-NSATBK   ;LAST LOGICAL TRACK # IN FILE SYS (NOT UDP)
95: SATWCT←←LSTBIT/=36+1   ;NUMBER OF WORDS IN SAT BIT-TABLE FOR FILE DSK
96: LSTUBT←←CAT(NTRK,\FPACKS)-NSATBK       ;LAST LOGICAL TRACK # IN FIRST UDP
97: SATUWC←←LSTUBT/=36+1   ;NUMBER OF WORDS IN SAT BIT-TABLE FOR UDP
98: LSTADR←←TTRK-NSATBK    ;LAST LOGICAL TRACK NUMBER (INCLUDING UDP)
99: LSTTRK←←TTRK-1         ;LAST LEGAL PHYSICAL TRACK NUMBER (INCLUDING UDP)
100: 
101: ;NCYLSH IS A TABLE CONTAINING THE NUMBER OF CYLINDERS FOR EACH PACK
102: ;EACH ENTRY IS SHIFTED LEFT 4 BITS.  USED AT READDN IN HPIC
103: NCYLSH:        
104: FOR @' I0,NPACKS-1 <
105:         NCYL'I4
106: >
    ALLDAT page# 0003 next  prev
108: BEGIN DSKDAT
109: 
110: BADMAX←←=45                    ;MAX NO. OF BAD TRACKS.
111: 
112: QQSIZ←←30                      ;NEED NOT BE > NUMBER OF DDB'S.
113: ;QBEGIN TO QUEND ZEROED BY DSKSER INITIALIZATION
114: QBEGIN:        BLOCK QQSIZ     ;INTERRUPT SUBR REQUEST QUEUE
115: QEND:  0
116: QALT:  0                       ;0 SELECTS UDP QUEUE, -1 SELECTS DISK QUEUE
117: QUBEG: BLOCK   10
118: QUEND: 0
119: 
120: MIPTR: BLOCK   2               ;DISK QUEUE, UDP QUEUE  INPUT POINTERS
121: MOPTR: BLOCK   2               ;AS ABOVE, OUTPUT POINTERS
122: MQEND: QEND
123:         QUEND
124: MQBEG: QBEGIN
125:         QUBEG
126: 
127: DFBUSY:        0               ;FLAG TO INDICATE I-SUBR ACTIVITY.
128: DQCNT: 0                       ;NUMBER OF LOSERS CURRENTLY IN DISK QUEUE
129: 
130: TFRRTN:        0               ;WHERE IN I-SUBR TO RTN TO WHEN XFER DONE
131: INTRTN:        0               ;WHERE TO GO TO DISMISS INTERRUPT
132:         GLOBAL CH6SAC
133: UUOACS←←CH6SAC
134: 
135: DSKACS:        BLOCK 20        ;I-LEVEL AC'S SAVED HERE BETWEEN INT'S
136: DSKPDL:        BLOCK 50        ;PRIVATE PDL FOR DSKSER CH6 OPS
137: 
138: DSKSV: 0
139:         MOVEM 17,UUOACS+17
140:         MOVEI 17,UUOACS
141:         BLT 17,UUOACS+16        ;SAVE USER'S ACS IN COMMON CH6 AREA.
142:         MOVE 3,[XWD -50,DSKPDL-1]
143:         PUSHJ 3,@DSKSV          ;SERVICE INTERRUPT.
144:         MOVSI 17,UUOACS         ;RETURN HERE TO DISMISS;
145:         BLT 17,17               ;RESTORE USER'S AC'S.
146:         JEN @DSKCHL
147: 
148: DSKEDD:        0               ;ERROR VERSION OF ABOVE
149: ACDDB: 0                       ;LAST DDB FOR BAD AUDIT
150: SWPDDB:        0               ;UDP DDB FOR SWAPPING
151: ERRBIT:        0               ;ERROR BITS FOR LAST XFER
152: DSKERB:        0               ;ERROR BITS (LH=IOP, RH=DISC)
153: DSKJB: 0
154: DSKMA: 0
155: DXB:   0                       ;CURRENT DDB
156: DXC:   0                       ;CURRENT TFRCTL
157: DXJ:   0                       ;JOB NUMBER
158: DXP:   0                       ;LAST STACK PTR
159: DXS:   0                       ;CURRENT TFRSEC
160: DXW:   0                       ;CURRENT TFRIOW
161: 
162: SYSBUF:        BLOCK SECSIZ    ;RETRIEVAL PART OF SYSTEM BUFFER
163: SYSDTA:        BLOCK BKDSIZ    ;DATA PART
164: QBUF:          BLOCK SECSIZ
165: BKIN:  0                       ;PRESENT OCCUPANT OF SYSBUF
166: DFTEMP:        0               ;SCRATCH CELL.
167: 
168: SATDIR:        -1              ;I/O DIRECTION. USED BY ACISAT ETC.
169:                                 ;-1:READ    0:WRITE     THE SAT TABLE.
170: 
171: ;SAT TABLE AS STORED ON BLOCK 0 OF THE DISK
172:         DEFINE ZWD (A)<↑A←←.-SATTAB0 >
173:         DEFINE ZLOC (A)<↑A←←.-SATTAB>
174: 
175: SATTAB:                        ;THIS IS SAT BIT AREA AS STORED ON DISK.
176:         ZWD(DSKUSE)             ;BLOCKS USED ON DISK
177:         ZWD(LSTBLK)             ;NUMBER OF LAST BLOCK ASSIGNED
178:         ZWD(SATID)              ;IDENT.NO. OF ALL DISK INFO
179:         ZWD(SATCHK)             ;XOR CHECKSUM OF SAT BITS BELOW
180:         ZWD(BADCNT)             ;NO. OF BAD TRACKS IN TABLE BELOW.
181:         ZWD(BADCHK)             ;CHECK (SUM) OF TABLE.
182:         ZLOC(BADTRK)
183:         BLOCK BADMAX            ;TABLE OF BAD LOGICAL BLOCK NUMBERS (TRACKS)
184:         ZWD(IDSAT)              ;CONTAINS 'SATID ' FOR NEW UDPS
185:         ZWD(DTIME)              ;TIME SAT LAST WRITTEN
186:         ZWD(DDATE)              ;DATE SAT LAST WRITTEN
187: P1OFF:         0               ;# PDP-10 POWER FAILURES        (MAIN SAT ONLY!)
188: P2OFF:         0               ;# OF PDP-6 POWER FAILURES      (MAIN SAT ONLY)
189:                 0               ;BUFFER WORD.                   (NOT NEEDED)
190:         ZLOC(SATBIT)            ;LOCATION OF THE BIT TABLE ITSELF
191:         BLOCK SATWCT    
192: SATEND:        0               ;END OF MAIN BIT TABLE (UDP SATS ARE DIFFERENT SIZE)
193: SATSIZ←←SATEND-SATTAB
194: USATSZ←←SATBIT+SATUWC+2        ;+2 FOR GOOD MEASURE
195: 
196: IFG SATSIZ-BLKWDS*NSATBK,<
197: .FATAL  SAT TOO BIG FOR THE DISK SPACE ALLOCATED. INCREASE NSATBK AND PRAY
198: >
199: 
200: ;HERE ARE THE MAGIC TABLES FOR MULTIPLE FILE STRUCTURES. REG/BH 7-14-74
201: SATADR:        SATTAB                  ;CORE ADDRESS OF SAT FOR EACH STRUCTURE
202:         REPEAT UPACKS,<0>
203: TSATSZ:        SATSIZ                  ;LENGTH OF SAT FOR EACH STRUCTURE
204:         REPEAT UPACKS,<USATSZ>
205: 
206: BFSET:         0                       ;BLOCK NUMBER OFFSET TO FIRST BN IN STR
207: FOR UNUM←1,UPACKS<
208:         CAT(TTRK,\<FPACKS+UNUM-2>)      ;OFFSET TO FIRST BLOCK OF THIS UDP
209: >
210: BFSETS:        06                     ;SAME AS BFSET ONLY SHIFTED LEFT 6 BITS
211: FOR UNUM←1,UPACKS<
212:         CAT(TTRK,\<FPACKS+UNUM-2>)6
213: >
214: LSTRKT:        LSTTRK                  ;MAX TRK FOR GODMOD--DSK GETS ALL PACKS
215: FOR UNUM←1,UPACKS<
216:         CAT(NTRK,\<FPACKS+UNUM-1>)-1    ;BUT EACH UDP ONLY GETS ITSELF
217: >
218: 
219: DKDBML:        DSKDDB                  ;ADDRESSES OF MODEL DDBS
220: FOR @$ UNUM←1,UPACKS<
221:                 UDP$UNUM$DD
222: >
223: 
224: LSTBTB:        LSTBIT
225: REPEAT UPACKS,< LSTUBT
226: >
227: 
228: UDPOWN:        REPEAT UPACKS,<-1>      ;JOB # OF PRIVATE OWNER.  -1 IF PUBLIC
229: 
230: ;UDPCNT THRU SATMOD+UPACKS ZEROED BY DSKINI
231: UDPCNT:        BLOCK UPACKS            ;# DDBS REFERENCING THIS UDP
232: SATMOD:        BLOCK UPACKS+1          ;-1 IF SAT NEEDS TO BE WRITTEN
    ALLDAT page# 0004 next  prev
234: ;DSKDDB: THE DUMMY DEVICE DATA BLOCK IS THE FIRST ONE IN THE CHAIN.
235: 
236:         DEFINE ZWD' (A)<
237:         A←←.-DSKDDB
238: ;       INTERNAL A
239:         0       >
240: 
241:         DEFINE ZLOC' (A)<
242:         A←←.-DSKDDB
243: ;       INTERNAL A      >
244: 
245: REPEAT DDBSKW-1,<0>
246:         DEVAOA!DEVSHR,,0        ;EXTRA WORD FOR MORE GOOD BITS
247: DSKDDB:SIXBIT /DSK/            ;DEVNAM
248:         XWD =60*HUNGST,201      ;DEVCHR  PUNIT=0!
249:         0                       ;DEVIOS
250:         XWD UDP1DD,DSKDSP       ;DEVSER. NEXT DDB IS UDP.
251:         XWD DVOUT+DVIN+DVDIR+DVDSK+DVLNG,154403 ;DEVMOD
252:         0                       ;DEVLOG
253:         0                       ;DEVBUF
254:         XWD PROG,0              ;DEVIAD
255:         XWD PROG,0              ;DEVOAD
256: 
257:         ;NEXT 8 LOCATIONS COPIED FOR AUDITOR
258:         ZWD FILNAM
259:         ZWD FILEXT
260:         ZWD FILPRO
261:         ZWD FILPPN
262:         ZWD FILLOC
263:         ZWD FILLNG
264:         ZWD REFTIM
265:         ZWD DMPTIM
266: 
267:         ZWD USETP
268:         ZWD UFDPRO              ;PROTECTION OF THE UFD FROM WHICH FILE CAME
269:         ZWD UFDPR1              ;TEMP COPY OF ABOVE WHILE DOING RENAME
270:                                 ;ALSO, RH← LH(DQINFO+3) OF UFD LAST ACCESSED
271:         ZWD UFDPPN              ;PPN OF LAST UFD USED
272:         ZWD UFDADR              ;DISK ADDR OF LAST UFD USED
273: 
274:         ZWD ACCNAM
275:         ZWD ACCEXT
276:         ZWD ACCPRO
277:         ZWD ACCPPN
278: 
279:         ZWD SRCNAM
280:         ZWD SRCEXT
281:         ZWD SRCPRO
282:         ZWD SRCLOC
283:         ZWD SRCTMP
284:         ZWD DMPBUF
285: 
286:         ZWD TFRSEC
287:         ZWD TFRIOW
288:         ZWD TFRCTL
289: 
290:         ZWD DSKFAD
291:         ZWD DSKLAD
292:         ZWD CORFAD
293:         ZWD CORLAD
294: 
295:         ZLOC DSKDAT;    BEGIN GRP-DEPENDENT PART OF DDB
296:         ZWD DDNAM
297:         ZWD DDEXT
298:         ZWD DDPRO
299:         ZWD DDPPN
300:         ZWD DDLOC
301:         ZWD DDLNG
302:         ZWD DREFTM
303:         ZWD DDMPTM
304:         ZWD DGRP1R;     FIRST USER RCRD NO. THIS GRP
305:         ZWD DNXTGP;     BLOCK NUMBER OF NEXT GROUP
306:         ZWD DSATID
307:         ZWD DQINFO      ;START OF SPECIAL STORAGE FOR LOGIN ETC.
308:         BLOCK 17+DSKDDB+DSKDAT-.
309: ↑↑DQLEN←←.-DSKDDB-DQINFO
310:         ZWD DOFFST      ;RECORD OFFSET
311:         ZLOC DPTR;      RETRIEVAL DATA,
312:         BLOCK 20        ;2 BLK NO.'S/WORD
313:         ZLOC DDEND
314: DDBSIZ←←.-DSKDDB+DDBSKW
315: 
316: FOR @$ UNUM←1,UPACKS
317: {REPEAT DDBSKW-1,<0>
318:         DEVSHR!DEVAOA!DEVLUP!DEVMAS,,0
319: UDP$UNUM$DD:
320:         SIXBIT /UDP$UNUM/
321:         =30*HUNGST,,UNUMPUNITP+201
322:         0                       
323: IFN UNUM-UPACKS,<
324:         CAT(CAT(UDP,\<UNUM+1>),DD),,DSKDSP
325: ;>      PTRDDB,,DSKDSP                  ;FOR OLD STYLE USE UDPDSP INSTEAD!
326:         XWD DVDSK!DVUDP!DVOUT!DVIN!DVDIR!DVLNG,154403   ;DVDSK!
327:         0                       
328:         0                       
329:         XWD PROG,0              
330:         XWD PROG,0              
331:         
332:         BLOCK <DDBSIZ-UDP$UNUM$DD+.>            ;MAKE SAME SIZE AS DSKDDB.
333: }
334: 
335: SYSRTV←←SYSBUF-DSKDAT  ;FOR REFERRING TO DDXXX IN SYSBUF
336: 
    ALLDAT page# 0005 next  prev
338: HA:    0
339:         0
340:         0
341: 
342: ;HERE ARE VARIOUS PIECES OF DATA.
343: 
344: PMPCNI:        0
345: DSKLRN:        0               ;LOGICAL DISK ADDRESS FOR THIS XFER.
346: 
347: DSKHNG:        0               ;DISK HUNG COUNTING CELL, COUNTED DOWN BY DEVCHK
348: DHNGST:        0               ;DSKHNG SET FROM HERE ON EACH DSK INTERRUPT
349: DRAUFO:        0
350: DSKOPS:        BLOCK   JOBN    ;NUMBER OF DISK OPERATIONS FOR EACH JOB
351: DSKOVC:        0
352: STAC:          0
353: STAC1:         0
354: SAC3:          0
355: SDAT:          0
356: SAVP:          0
357: INTPDL:        0
358: 
359: 
360: SKCMD:         36007!DSKADR    ;SEEK COMMAND.
361: SKWCMA:        SKDAT
362: SCCMD:         36461!DSKADR    ;SEARCH COMMAND,WITH CHAIN & SKIP IF OFF
363: SCWCMA:        SCDAT
364: 
365: ;FOLLOWING MUST BE IN ORDER:
366: 
367: RCMD:  22006!DSKADR            ;READ COMMAND
368: WCMD:  22005!DSKADR            ;WRITE COMMAND
369:         16555!DSKADR    ;"USE" MODE. SRCH KEY/DATA EQ-HI.
370:         16455!DSKADR    ;"OWN" MODE. SRCH KEY/DATA EQ.
371: 
372: ;NEXT 2 LOCS ARE A TABLE!
373:                 SKIPL TAC               ;READ END TEST
374: ENDTAB:        CAML TAC,[-1,,0]        ;WRITE END TEST
375: 
376: SNSCMD:        34004!DSKADR    ;SENSE COMMAND.(4 BYTE MODE)
377: SNWCMA:        SNSDAT
378: SNSDAT:        BLOCK SNSLEN/4  ;SENSE PUTS DATA HERE.(4 BYTES PER WORD)
379:                 0
380: RCALCM:        23!DSKADR       ;RECALIBRATE THE SEEK HYDRAULICS.
381: RDHACM:        34032!DSKADR    ;READ HOME ADDRESS.(4 BYTE MODE)
382: NOPCMD:        3!DSKADR        ;NO-OP COMMAND
383: 
384: ;COMMANDS FOR DIAGNOSTIC LOAD AND WRITE
385: 
386: DWCMD:         36163!DSKADR    ;DIAGNOSTIC WRITE
387: MSKCMD:        22037!DSKADR    ;SET FILE MASK
388: DLCMD:         36123!DSKADR    ;DIAGNOSTIC LOAD
389: RD1CMD:        34104!DSKADR    ;READ DIAGNOSTIC STATUS 1
390: 
391: FILMSK:        BYTE(8)4        ;PERMIT DIAGNOSTIC WRITE COMMAND
392: 
393: 
394: ;COLLECT ERROR COUNTS HERE
395: ERRCL0:        0
396: ERRCL1:        0
397: ERRCL2:        0
398: ERRCL3:        0
399: ERRCL4:        0
400: ERRSNS:        0
401: ERRHA:         0
402: ERRRCL:        0
403: SHADPE:        0
404: 
405: ;THESE ARE THE HARD ERROR MAXIMUMS!
406: MAXCL0:        100
407: MAXCL1:        100
408: MAXCL2:        100
409: MAXCL3:        100
410: MAXCL4:        100
411: MAXSNS:        10
412: MAXHA:         10
413: MAXRCL:        10
414: 
415: ;THESE ARE THE MASKS FOR WHEN TO PRINT AN ERROR CLASS
416: ;THEY MUST BE -2**N-1 FOR TDNE
417: TYMSK0:        ¬10
418: TYMSK1:        ¬10
419: TYMSK2:        ¬10
420: TYMSK3:        ¬10
421: TYMSK4:        ¬20
422: 
423: ;COLLECT TOTAL COUNTS HERE
424: TOTCL0:        0
425: TOTCL1:        0
426: TOTCL2:        0
427: TOTCL3:        0
428: TOTCL4:        0
429: 
430: ;SET THESE FLAGS TO FORCE TYPEOUT OF EVERY ERROR
431: TYPCL0:        0
432: TYPCL1:        0
433: TYPCL2:        0
434: TYPCL3:        0
435: TYPCL4:        0
436: 
437: DSKACT:        0       ;FLAG DISK CHANNEL ACTIVE
438: 
439: DEATH:         0       ;ERROR ROUTINE HAS DECREED DEATH TO THE INFIDEL'S
440: 
441: TYPANY:        0
442: SNSTYP:        0
443: CSTOP:         0
444: ERRCMD:        0
445: CNISAV:        0
446: XDSKMA:        0
447: 
448: HNGFLG:        0
449: CT:            0
450: LCT:           0
451: WCT:           0
452: HAFLAG:        0
453: DSKFLG:        0
    ALLDAT page# 0006 next  prev
455: D2INT: 0                               ;JSR HERE FROM 144
456:         MOVEM TAC,TSAV
457:         CONI PMP,TAC                    ;GET STATUS
458:         TRNN TAC,NEWST!UNEND            ;NEW STATUS OR UNUSUAL END?
459:         JRST ITEST                      ;NO.  PERHAPS CHDEMP
460:         XOR TAC,TSTXOR
461:         TDNN TAC,TSTBIT                 ;SKIP IF LOSING.
462:         TRNN TAC,DEVEND!CHNEND          ;ONE OF THESE OUGHT TO BE ON IF NEW STATUS
463:         JRST D2XE                       ;SOMETHING EVIL THIS WAY COMES.
464:         XOR TAC,TSTXOR                  ;RESTORE ORIGINAL CONI BITS FOR COROUTINES
465:         CONO IBM,CNEWST                 ;CLEAR NEW STATUS
466:         CONSO PMP,CHDEMP                ;GOT DEV END, CMD HLD EMPTY?
467:         JRST D2X1
468:         JRST @D2X                       ;CMD HLD EMPTY.  CONTINUE IN COROUTINE
469: 
470: D2X:   0
471: D2X1:   CONO IBM,ACTCLR
472: D2X2:   EXCH TAC,TSAV
473:         JRST 12,@D2INT
474: 
475: D2XE:   XOR TAC,TSTXOR                  ;RESTORE CONI BITS
476:         CONO PMP,NEWST!UNEND!10!DSKCHN  ;MAKE LOW PRIORITY CHANNEL HANDLE THIS
477:         EXCH TAC,LSTAT                  ;STORE LOSING STATUS
478:         JRST D2X2
479: 
480: ITEST:  SKIPN DSKACT            ;SHOULD WE BE HERE AT ALL?
481:         JRST D2BARF             ;NO
482:         TRNE TAC,20             ;IS DISK INTERRUPTING AT ALL?
483:         TRNE TAC,4              ;IS HE IN LOWER CHANNEL?
484:         JRST D2BARF
485:         JRST @D2X               ;ALL IS WELL?
486: 
487: D2BARF:EXCH P,ERRPD            ;SAVE P AND GET A PDL
488:         PUSHACS
489:         PUSHJ P,DISMES
490:         ASCIZ/
491: IN THE DISK CHANNEL WITHOUT AN INTERRUPT. GET A WIZARD.
492: /
493:         SETOM DISFLAG
494:         PUSHJ P,DISFLUSH
495:         HALT .+1
496:         POPACS
497:         EXCH P,ERRPD
498:         JRST D2X2
    ALLDAT page# 0007 next  prev
500: ;MORE DATA FOR D2CHN
501: SKDAT: BLOCK 2
502: SCDAT: BLOCK 2
503: XWCMA: 0
504: 
505: LSTREC:        0
506: 
507: ENDTST:        0
508: 
509: XWRAP:         0
510: TSAV:          0
511: LSTAT:         0
512: D2DONE:        0
513: D2LUZ:         0
514: LWCMA:         0
515: LSTOP:         0
516: XCMD:          0
517: CHNEMP:        0
518: TSTXOR:        DSKADR12!20            ;PACK NUMBER DPB'ED HERE
519: TSTBIT:         37700,,UNEND!ATTN!CUEND!BUSY!UCHK!UXCPTN!20
520: SATID1:        0               ;FIRST COPY OF SATID
521: SATID2:        0               ;SECOND COPY OF SATID
522: BEND DSKDAT
    ALLDAT page# 0008 next  prev
524: BEGIN DPYDAT
525: SUBTTL III AND DATA DISK DATA STORAGE
526: 
527: ;; NOW SOME DISPLAY OPCODES AND MACROS FOR GENERATING DP INSTRS.
528: 
529: DISJMP←←20      ;DP JMP INSTR. OPCODE.
530: DISJMS←←4       ; JMS (STORES TWO WORDS)
531: DISJSR←←24      ; STORES ONLY RETURN ADDR.
532: DISRST←←14      ;RESTORE.
533: DISSEL←←10      ;SELECT.
534: DISNOP←←14      ;ACTUALLY RST, BUT A GOOD NOP WITH ALL BITS OFF.
535: DISSKP←←12      ; TEST AND SKIP
536: DISKPN←←32      ; TEST AND NOT SKIP
537: 
538: DEFINE LVW(X,Y,TYPE,MODE,BRT,SIZ)       ;ASSEMBLES A LONG VECTOR.
539:   { MVW1 (MODE,TYPE,BRT,SIZ)    ;TWIDDLE PARAMS.
540:         BYTE (11)<X>,<Y>(3)B,S(2)MD,TT(3)3 }    ;ASSEMBLE INSTR.
541: DEFINE MVW1 (M,T,BRT,SIZ)
542:  {IFIDN {M}{A}{MD←1;}MD←0       ;MODE = `A' FOR ABSOLUTE.
543:   IFIDN {T}{I}{TT←2;}TT←0       ;TYPE = `I' FOR INVISIBLE.
544:   IFIDN {BRT}{}{B←0;}B←BRT      ;BRT = 0 IF OMITTED.
545:   IFIDN {SIZ}{}{S←0;}S←SIZ      ;SAME FOR SIZ.
546: }
547: DEFINE CW (C1,B1,C2,B2,C3,B3) {<BYTE (8)<B1>,<B2>,<B3>(3)<C1>,<C2>,<C3>>!4}
    ALLDAT page# 0009 next  prev
549: COMMENT ⊗   NOW THE DPY PROGRAM HEADERS.  
550:  THERE IS ONE OF THESE FOR EACH DPY PROGRAM
551:  IN EXISTENCE; IN GENERAL, ONE FOR EACH CONSOLE PLUS
552:  ONE FOR EACH DETACHED JOB DOING DPY OUTPUT. THE HEADERS
553:  AND THE START,RESTART, AND STOP TABLES ARE THE ONLY PARTS
554:  OF THE WHOLE INCREDIBLE DPYSER DATA STRUCTURE WHICH DO NOT
555:  GO IN FREE STORAGE.
556: 
557: 
558: BUFL←←40               ; EDITING BUFFER IS THIS MANY WORDS LONG
559:                 ZZQ←←.
560:                 DEFINE Z(FOO){FOO←←.-ZZQ
561: }               
562:         
563:                 XWD .+3,DISRST+40
564:                         ;PRGM. NORMALLY STARTED HERE. 
565:                         ;  RESTORE PRIOR STATE OF DP.
566: Z(PSELC)        BYTE (12),7777,DISSEL   ;FIRST DESELECT ALL CONSOLES
567: Z(PSELA)        BYTE (12)1(=11-0),,DISSEL      ;THEN RESTORE OLD SELECTION
568: Z(PRGSTP)       0       ;PRGM IS STOPPED BY A JMS TO HERE.
569: Z(PRGSAV)       0
570: Z(WHOCALL)      DISNOP  ;CALL WHO LINE(IF ANY).
571: Z(PPCALL)       DISNOP  ;HERE IS A JMP TO PAGE 0 OF PP.
572: Z(LEPOS)        DISNOP
573: Z(LEJMS)        XWD ZZQ+LEB,DISJMS
574:                         ;CALL THE LINE EDITOR.
575: Z(PGCALL)       DISNOP  ;HERE A JMP TO PIECE OF GLASS CONT. BLK.
576:                 0       ;HERE PRGM NORMALLY HALTS.
577: Z(PSELB)                ;ANOTHER COPY OF SELECT WORD. PRGM RESTARTS HERE.
578:                 BYTE (12)1(=11-0),¬(1(=11-0)),DISSEL
579: Z(RTJMP)        XWD WHOCALL+ZZQ,DISJMP
580: 
581: Z (PRGNUM)      0       ;NO. OF DPY THIS PRGM ATTACHED TO.
582: Z (BLKTOT)      -7      ;NO. OF BLOCKS OF STORAGE HE CAN USE.
583: Z(CURPP)        0       ;PTR. TO CTRL. BLK. OF SELECTED P OF P.
584: Z(CURPG)        0
585: Z(PRGACT)       400000  ;BITS TELL STATE OF ACTIVATION OF P OF P'S.
586: Z(USRACT)       0       ;SAVED VERSION OF PRGACT.
587: Z(LSTPG)        0       ;HIGHEST PG IN USE BY USER.
588: Z(LECLIN)       0       ; FLAG THAT SAYS THIS BLOCK HAS A CLOCK REQUEST IN TO HAVE ITSELF KILLED, WHEN IT BECOMES FREE
589: ;FORGET THIS CELL ;Z(DPKTIM)    0       ; WORD INDICATING TIME KEY WAS STRUCK
590: ;AND THIS ONE     ;Z(DPGTIM)    0       ; TIME GRAPHICS WENT OUT
591: Z(DPRLSF)       0       ; FLAG THAT SAYS THIS PROGRAM HEADER BELONGS TO A DETACHED JOB AND IS TO BE RELEASED
592: Z(PRGCW)        0       ; COMMAND WORD FOR USER GRAPHICS TRANSFERS
593: Z(PRGJMP)       0       ; JUMP TO USER PROGRAM
594: Z(PRGCNT)       0       ; DUMMY COUNT WORD
595: Z(DPHOLD)       0       ; -1 IF HOLDING
596: Z(GWORD)        0       ; GARBAGE WORD. HOLDS EVERYTHING WHAT WON'T FIT ELSEWHERE
597:                         ; B0 1-PAGE PRINTER SIZE SET LAST BY CONSOLE COMMAND, 0-BY UUO
598:                         ; B1 SAME FOR PAGE PRINTER Y-POSITION.
599:                         ; B2 SAME FOR LINE HOLD COUNT
600:                         ; B3 SAME FOR GLITCH HOLD COUNT
601:                         ; B9-17 LINE HOLD COUNT
602:                         ; B18-26 GLITCH HOLD COUNT
603:                         ; B27-35 CHAR WHICH ACTIVATED LINED
604: Z(LHCNT)        0       ; LINE HOLD COUNTDOWN
605: Z(GLHCNT)       0       ; GLITCH HOLD COUNTDOWN
606: Z(LEB)
607: 
608:                 0       ;DP DOES A JMS TO HERE TO DISPLAY EDITOR BUFFER.
609:                 0
610: Z(LEPPV)        0       ;POINTER POSITION VECTOR FOR EDITOR POINTER.
611: Z(III)          LVW (-5,-14)    ;WILL BE 0 ON DD
612:                         ;DRAW THE POINTER.
613: Z(VDTMP)        LVW (12,0)      ;TEMP MAPPING STORED HERE ON DD
614: Z(PPHPOS)       LVW (-5,14)     ;USED AS TEMP FOR DD CURSOR ROUTINES
615:                 XWD ZZQ+LEB+1,DISRST+40
616:                         ;RESTORE BEAM POSTION.
617: Z(LELMAR)       LVW(0,0,I)
618:                         ;LEFT MARGIN VECTOR... USED FOR SHIFTING LONG LINES.
619: Z(LEBUF)        REPEAT BUFL,<XWD ZZQ+LEB,DISJMP>
620:                         ;THE EDITOR BUFFER.
621: 
622: Z(LEHPOS)       0       ;HORIZONTAL POSITION OF POINTER (IN COLUMNS).
623: Z(CCPOS)        0       ;LOGICAL POSITION OF POINTER, IN CHRS. FROM START OF LINE.
624: Z(FCPOS)        0       ;NO. OF CHRS. IN LINE.
625: Z(LELWD)        0       ;POINTER TO LAST WORD OF BUFFER IN USE (ONE BEFORE THE RETURN JMP).
626: Z(LSTHP)        0       ; SAVED HORIZONTAL POSITION
627: Z(LEENQ)        0       ; NUMBER OF LINE EDITOR TASKS IN THE QUEUE
628: Z(LEENQ2)       0       ; NUMBER OF SCREEN REFRESH AND/OR HELP TASKS IN QUEUE.
629: Z(LECHPS)       0       ; SAVED VALUE OF HORIZONTAL POSITION
630: Z(MAXPT)        ZZQ+LEBUF+BUFL-4
631:                         ;MAXIMUM ALLOWABLE VALUE OF LELWD (I.E., END OF BUFFER).
632: Z(NUMARG)       0       ;REPEAT ARGUMENT.
633: Z(LEARG)        0       ; REPEAT ARGUEMENT SAVED FOR <ESC>G COMMAND AND ITS FRIENDS
634: Z(LEPNT1)       0       ;BYTE POINTER CORRESPNDING TO EDITOR POINTER.
635: Z(NTABPT)       0       ;BYTE PTR. TO NEXT TAB IN LINE TO RIGHT OF CURRENT POS.
636: Z(NTABCT)       0       ;NUMBER OF SPACES IN NEXT TAB.
637: Z(LEACT)        0       ; LINE EDITOR TELLS DPYKILL THAT A CHARACTER HAS BEEN TYPED HERE
638: Z(LEINV)        0       ; MEANS LINE EDITOR BUFFER IS NOW INVALID
639: Z(LEWAKE)       0       ; THIS IS SET BY A TRANSFER THAT IS ABORTED BECAUSE OF INVALID BUFFER
640: Z(NCRS)         0       ; NUMBER OF LONG-LINE CRLFS IN LINE
641: Z(LEVP)         0       ; VERTICAL POSITION OF LINE EDITOR LAST TIME IT WENT OUT
642: Z(LEHP)         0       ; HORIZONTAL POSITION OF LINE EDITOR
643: Z(LENCRS)       0       ; NUMBER OF LINES IT TOOK LAST TIME IT WENT OUT.
644: Z(LECVP)        0       ; LAST CURSOR VERTICAL POSITION
645: Z(LECHP)        0       ; LAST CURSOR HORIZONTAL POSITION
646: Z(LECLK)        0       ; MEANS CLOCK REQUEST IS IN
647: Z(LETXC)        0       ; MEANS LINE EDITOR TEXT HAS CHANGED
648: Z(LEMISS)       0       ; INDICATES A TRANSFER MISSED DUE TO BUFFER INVALID
649: Z(LECC)         0       ; SAYS WHETHER AN <ESC>C HAS BEEN TYPED
650: Z(LELINE)       0       ; LINE NUMBER OF LINE EDITOR
651: Z(CVP)          0       ; CURRENT CURSOR VERTICAL POSITION
652: Z(CHP)          0       ; CURRENT CURSOR HORIZONTAL POSITION
653: Z(WHOTAB)       0       ; WHO LINE TIME,,JOB #
654: Z(WHORUN)       0       ; TIME WHEN RUN TIME SHOULD BE UPDATED ON WHO LINE
655: Z(LETBPT)       0       ;PTR. TO THE LETAB ENTRY FOR THIS DPY.
656: Z(LCH)          0       ;
657: Z(DPYLEN)
658: 
659: ORG ZZQ                 ; DON'T LOSE ANY STORAGE OVER THESE DEFINITIONS
    ALLDAT page# 0010 next  prev
661: STRTBL:BLOCK DPYNUM    ;THIS TABLE, INDEXED BY DISPLAY NO.,
662:                         ;GIVES NORMAL START POINT FOR ITS PROGRAM.
663: 
664:         0               ;STPTBL(-1) FOR HOLDING MESSAGE
665: STPTBL:BLOCK DPYNUM    ;SAME THING FOR STOP POINTS.
666:         0               ;STPTBL(DPYNUM) FOR IDLE STATE
667: 
668: SELTBL:BLOCK DPYNUM    ;POINTERS TO SELECT WORDS
669: RSTTBL:BLOCK DPYNUM    ;RESTART (I.E. BEGINNING OF PRGM) POINTS.
670: LETAB: BLOCK DPYNUM+DDNUM      ; LINE EDITOR HEADERS ARE HERE
671:         BLOCK DPYNUM    ;EXTRA 6 0'S FOR VDSMAP ROUTINES ADDRESSING "SHADOW" CHANNELS
672: 
673: DXFLAG:        0       ;APAIR OF FLAGS FOR SYNCHRONIZING DP RESTARTING WITH
674: DRUNCT:        0       ; NUMBER OF CURRENTLY RUNNING DISPLAY
675: SAVTAC:        0       ; DPY NUMBER DURING ERROR TYPEOUT
676: DPCNI:         0       ; DP CONI BITS
677: LCPDL←←100             ;LENGTH OF CLOCK PUSHDOWN LIST.
678: DPYPDL:        IOWD LCPDL,CLKPD
679:                         ;SPECIAL CLOCK LEVEL PDL.
680: CLKPD:         BLOCK LCPDL+1
681:                 0
682: CLKQUE:        BLOCK 6*<DPYNUM+DDNUM>
683: 
684: CLKQ:          POINT 36,CLKQUE-1,35
685:                         ;MAIN PTR. TO CLK QUE.
686: 
687: WTFLG:         0       ;IF -1, WE ARE SUSPENDING NORMAL CLK. SERVICE TO WAIT FOR FREE STG.
688: 
689: SVAC:          BLOCK 20
690: DPYMAP:        BLOCK JOBN
691: NBS←←=100
692: TBL:           BLOCK NBS+1
693:                         ; PLACE TO BUILD BLOCK MAP FOR UPGMOVE
694: ERRP:          0       ; ROUTINE THAT IS ENTERED WITH A JSA
695:                 JRST ERRP2
696: FREEHD:        0
697: FSWTHD:        0
698: FSWT2H:        0
699: FREEC:         0
700: FREETL:        0
701: FRETOT:        0
702: FSWC:          0
703: CLKLVL:        0       ; SAYS WE ARE AT CLOCK LEVEL
704: CLKQTMP:       0       ; TEMP CELL
705: FSW2C:         0
    ALLDAT page# 0011 next  prev
707: ; DATA DISK DATA STORAGE
708: 
709: DDSTART:       0       ; UUO LEVEL SETS THIS TO START UP DD. SEEN BY APRINT.
710: DDCNT:         3B2     ; NUMBER OF TIX THIS PROGRAM IS ALLOWED TO RUN BEFORE IT IS TIMED OUT.
711: DDDSP:         0       ; THIS IS THE I-LEVEL DISPATCH ADDRESS.
712: DDRET:         0       ; WE JUMP INDIRECT HERE TO RETURN FROM I-LEVEL
713: DDRTN:         0       ; EVERYONE JSRS HERE TO RETURN
714:                 JRST @DDRET
715: DDSAC1:        0       ; ACCUMULATORS . . .
716: DDSAC2:        0
717: DDSAC3:        0
718: DDSTAC:        0
719: DDSDAT:        0
720: DDNXT:         0       ; ADDRESS OF NEXT TASK TO BE DONE
721: DDCUR:         0       ; DATA BLOCK ADDRESS CURRENTLY IN USE
722: DDCURT:        0       ; TASK BLOCK ADDRESS CURRENTLY IN USE
723: DDCURQ:        0       ; THIS IS WHERE I-LEVEL PUTS THE CONTROL BLOCK ADDRESS BEFORE DISMISSING
724: DDCOL:         0       ; HERE WE KEEP COLUMN ADDRESSES
725: DDLST:         0       ; ADDRESS OF LAST FRAME LOOKED AT
726: DDOFF:         0       ; SET TO -1 TO INHIBIT DD TRANSFERS
727: DDQUE:         0       ; HERE LIES THE DATA DISC QUEUE
728: DDSQ:          0       ; WE SAVE THE ENTIRE TASK QUEUE HERE
729: DDLFD:         0       ; WE SAVE THE FIELD WORD OF THE LAST FRAME HERE.
730: LEBFR:         CW 1,46,2,0,3,2
731:                 CW 3,2,4,0,5,0
732:                 0
733:                 0
734: DDCURS:        0
735:                 CW 3,1,4,0,5,0
736:                 REPEAT 20,<2>
737:                 CW 0,0,3,1,3,1
738:                 0
739: CZPNT:         POINT 36,CURZWD-1,35
740: CURZWD:        BLOCK 4
741: DDCRLF:        REPEAT =40,<ASCID /  
742: />
743:                 0
744: DDRUN:         0       ; TELLS IF DD IS CURRENTLY RUNNING
745: DDERRS:        CW 1,46,2,0,3,1
746:                 CW 3,2,4,0,5,0
747:                 XWD DDCRLF,DISJMP
748: 
749: WSERC:         CW 1,17,2,0,3,2
750:                 CW 1,46,2,0,3,2
751:                 0
752: DPYARN:        0       ; DENOTES THAT 'CONSOLE AVAILABLE' MESSAGE HAS BEEN RUN THIS TICK
753: DPYAVL:        LVW -600,0,I,A,2,4
754:                 XWD 770000,DISSEL
755:                 <BYTE (8)377>!DISSKP
756:                 XWD TTYLOK,20!DISRST
757:                 <BYTE (8)367,0,367>!DISKPN
758:                 XWD DPYAV2,DISJMP
759:                 XWD MAINTMODE,20!DISRST
760:                 <BYTE (8)367,0,367>!DISSKP
761:                 XWD DPYAV1,DISJMP
762: DPYAV2:         ASCID /SYSTEM IS DOWN!!!/
763:                 0
764: 
765: DPYAV1:         ASCID /TAKE ME I'M YOURS!/
766:                 0
767: ;*** RPH PATCH TO CATCH LOSING DP
768:                 XWD .+1,24
769:                 0
770:                 XWD .-2,20
771: ;END PATCH
772: 
773: AVLWHO:        CW 1,17,2,0,1,46        ;WE SEND AN ERASE DURING FIRST FIELD ONLY
774:                 0
775:                 AVLWDD,,DISJMP
776:                 ASCID / 
777: /
778: DDWMES:        1                               ;PATCH HERE TO DISPLAY OTHERS
779:                 ASCID /                                 Take Me I'm Yours!
780: /
781:                 0
782: 
783: AVLWDD:         ASCID /             DD JBS,TCOR  R,RCOR UCOR  NL DSKQ
784: /
785:                 COMDD,,DISJMP
786: 
787: DDUNMS:        ASCID /                             No Data Disk Channels Left
788: /
789:                 0
790: 
791: DDDMES:        ASCID /                                   System Is Down!
792: /
793:                 0
794: 
795: AVLLN:         0               ;XWD FIRST,SECOND TEXT LINE FOR AVL MSG
796: AVLVP:         CW 3,2,4,2,5,4  ;GETS CLOBBERED BY PHANTOM STARTER
797: WHOKLU:        0               ;COUNTS DOWN TO AVL MSG SHIFT OR -1 TO GOOSE WHOSER
798: 
799: DDSTRS:        CW 1,46,2,0,3,2
800:                 CW 3,2,4,1,5,11
801:                 ASCID /   ********************** →HOLDING← **********************/
802:                 CW 0,0,3,2,3,2
803:                 0
804: 
805: DPYHOL:        0
806: DPYHLD:        XWD 77,DISSEL
807:                 LVW (-600,660,I,A,2,2)
808:                 ASCID /   ********************** →HOLDING← **********************/
809:                 COMIII,,DISJMP                  ;GO DISPLAY SYSTEM LINE OF WHO LINE
810: 
811: ;MODEL WHO LINE BLOCK (COPIED INTO FREE STORAGE)
812: TITLE:         0               ;III JSRs to here.  FOR DD, COMMAND WORD GOES HERE
813:                 BYTE(11)<-1000>,740(3)2,2(2)1,2(3)3 ;III POSITION WORD.  DDs PUT CMD WORD HERE
814:                 COMDD,,DISJMP   ;IIIs get a no-op deposited here.
815: WTEND←←.-TITLE
816: WTTYS:         REPEAT 3,<ASCID/     /
817:                 >               ;SPACE FOR FIRST PART OF USER WHO LINE
818:                 ASCID   /  /    ;three nulls here (NOT TO MENTION 2 SPACES)
819:                 REPEAT 3,<ASCID/     /
820:                 >
821:                 ASCID   /   K        -             -        / ;7 words of constants
822:                 REPEAT 4,<12
823:                 >               ;SPACE FOR SEGMENT NAME AND ALIAS
824:                 ASCID   /
825: /                               ;CRLF TO FINISH USER LINE
826: WLINK←←.-TITLE
827:                 0               ;DD HALT.  FOR III, A JMP TO TITLE GETS PUT HERE
828: 
829: ;DISPLAY SUBROUTINE FOR SYSTEM DATA ON FIRST LINE OF WHO LINE
830: COMIII:        BYTE(11)<-1000>,770(3)2,2(2)1,2(3)3     ;III POSITION WORD.
831: WHOSEL:        770000,,DISSEL  ;HERE WE SELECT WHICH III'S GET THE SYSTEM WHO LINE
832: COMDD:                         ;DDD PROCESSOR ENTRY POINT
833: COMWHO:        ASCID/                   ,       ,       K    %   D          / 
834:                 ASCID/              :  
835: /                               ;CONSTANTS IN SYSTEM LINE
836:                 DISKPN          ;SKIP ALWAYS, IF III
837:                 .+2,,DISJMP     ;NO COMMENT!
838:                 0               ;III HALTS HERE
839:                 CW (3,2,3,2,3,2);SELECT COL 2.  DISKPN ISN'T QUITE A NO-OP ON DDD!
840: DDDRET:        DISJMP          ;DD JMP TO USER LINE OF WHO LINE.  ADR PLACED IN LH
841: 
842: DDTAB: BLOCK 40        ;CHANNEL TABLE
843: DDFLST:        0       ;FREE LIST HEADER, MUST FOLLOW DDTAB
844: DDFCNT:        0       ;# FREE CHANS
845: AVLCHN:        11      ;CHAN FOR AVAIL MSG
846: AVLBIT:        0       ;BIT   "    "    "
847: VDMAP: BLOCK DDNUM     ;THE PERMANENT MAP
848:         BLOCK DPYNUM    ;CELLS FOR "SHADOW" CHANNELS
849: 
850:         BEND DPYDAT
    ALLDAT page# 0012 next  prev
852: BEGIN DTCDDB
853: SUBTTL  DTCDDB 06-AUG-68 DECTAPE DATA BLOCK
854: 
855: ;DTA DEVICE DATA BLOCKS
856: 
857: DEFINE CAT6'(A,B),<SIXBIT /A'B/>
858:         
859: DEFINE DTCDDX!(UNIT),<
860:         REPEAT  DDBSKW-1,<0>    ;SKEW-ZEROES
861:         DEVLUP,,0               ;DEVCMR
862:         ZZ←.
863: IFE UNIT,<↑DTCDDB←.>
864:         CAT6(DTA,\<UNIT+1>)
865:         XWD     =10*HUNGST,200+<UNIT+1>PUNITP  ;LONG HUNG COUNT IS INSERTED WHEN A DUMP
866:                                                 ;MODE OPERATION HAPPENS.
867:         0
868:         XWD     IFE UNIT-(DTCNUM-1),<MTCDDB,DTCDSP;>LINK,DTCDSP
869:         LINK←.-4
870:         XWD     DVDIR+DVIN+DVOUT+DVDTA+DVLNG,154403
871:         0
872:         0
873:         XWD     PROG,0
874:         XWD     PROG,0
875:         XP      DTNEXT,.-ZZ     ;LH=NEXT OUTPUT BLOCK NO.
876:                                         ;RH NEXT INPUT BLOCK NO.
877:         0
878:         XP      DTERR,.-ZZ      ;ERROR COUNT OF FATAL ERRORS
879:         0
880:         XP      CURENT,.-ZZ     ;POINTER TO CURRENT DIR ENTRY(ABSOLUTE)
881:         0
882:         XP      UFREE,.-ZZ      ;RH=LAST BLOCK USED. 1 FOR A CLEARED DIRECTORY
883:         XWD     0,0             ;LH=BLKCNT WHILE TAPE INACTIVE, INIT AT BLD TIME
884:         XP      UDIR,.-ZZ               ;LINK TO DIRECTORY IN DATA BLOCK
885:         .+1             ;ADDR DTA DIRECTORY
886:         BLOCK   200             ;DTA DIRECTORY
887: >
888: 
    ALLDAT page# 0013 next  prev
890: UNIT←DTCNUM-1
891: ; THE FOLLOWING EXPANSION OF THE MANY DECTAPE DEVICE DATA BLOCKS
892: ; HAS BEEN XLIST'ED OUT FOR YOUR READING CONVENIENCE.
893: ; THEY ACTUALLY LOOK LIKE THIS:
894: ; REPEAT DTCNUM,<DTCDDX(UNIT)
895: ;         UNIT←UNIT-1>
896: XLIST
897: REPEAT DTCNUM,<DTCDDX(UNIT)
898:         UNIT←UNIT-1>
899: LIST
    ALLDAT page# 0014 next  prev
901: ;TEMPORARY STORAGE FOR DECTAPE SERVICE
902: BLKPTR:        0       ;BLKI/BLKO POINTER.
903: DMPPTR:        0       ;DUMP MODE BLKI/BLKO POINTER
904:                         ;MOVED TO BLKPTR AT INTERRUPT
905: DMPLST:        0       ;RELATIVE POINTER TO CURRENT DUMP MODE
906:                         ;COMMAND LIST WORD
907: DTOTAL:        0       ;TOTAL ERROR COUNT FOR SYSTEM SINCE IT WAS
908:                         ;LOADED(COUNT NOT CLEARED AT SYSTEM INITIALIZATION)
909: DFTOTAL:       0       ;TOTAL FATAL ERROR COUNT FOR SYSTEM SINCE LOADED
910:                         ;IE FAILED DTTRY (3 USUALLY) TIMES
911: DTTAC:         0       ;PLACE TO SAVE TAC ON DT CHANNEL
912: DTUNIT:        0       ;DT UNIT IN BITS 30-32,DT PI CHAN. BITS 33-35
913: ERRFLG:        0       ;DATA MISSED BY DC IF NON-ZERO
914: RBNCNT:        0       ;COUNT DOWN NUMBER OF REVERSALS SEEKING BLOCK
915: UBUF:          0       ;ABS. ADR. OF SECOND WORD OF USER BUFFER
916: UERRCN:        0       ;NO. OF ERROR SO FAR ON THIS OPERATION
917: UPROG:         0       ;XWD PROTECTION,RELOCATION FOR JOB USING DECTAPES
918: UDPROG:        0       ;XWD 0,RELOCATION(USED BY DUMP MODE ONLY)
919: USVDB:         0       ;ADR. OF DEVICE DATA BLOCK FOR CURRENT UNIT
920: BLKCNT:        0       ;COUNT OF NO. OF BLOCKS WHICH CURRENT JOB
921:                         ;USING DECTAPES CAN DO BEFORE HAVING TO GIVE
922:                         ;THEM TO ANOTHER JOB IF ONE IS WAITING
923:                         ;THIS IS SETUP AT UUO LEVEL AND DECREMENTED AT
924:                         ;JOB DONE TIME AT INTERRUPT LEVEL
925:                         ;IF TAPE MUST SEARCH FOR BLOCK, COUNT IS SET TO ZERO
926:                         ;MEANING THAT QUANTUM IS EXCEEDED IMMEDIATELY
927: 
928: 
929: UBKN:          0
930: BNDISP:        0
931: CONSZ1:        0
932: RDBN:          0
933:                 JRST RDBN1
934: WTRV:          0
935:                 JRST WTRV1
936: RDRV:          0
937:                 JRST RDRV1
938: ENPT:          0
939:                 JRST ENPT0
940: ENPT1:         0
941:                 JRST ENPT2
942: DMPADV:        0
943:                 JRST DMPA0
944: DCLOC:         0
945: DCLOC1:        0
946: 
947:         BEND DTCDDB
    ALLDAT page# 0015 next  prev
949: IFN FTDISK,<
950: ;;TASK BLOCK DEFINITIONS . . .
951: 
952: FBADR←←0
953: FBWC←←1
954: FBDONE←←2
955: FBDA←←3
956: FBRETRY←←4
957: FBBND←←5
958: FBJOB←←6
959: FBLINK←←7
960: 
961: FBSIZ←←FBLINK+1
962: 
963: ;;NUMBER OF BANDS THE THING HAS . . .
964: 
965: NBANDS←←170
966: MAXFB←←40
967: 
968: BEGIN FBDAT
969: SUBTTL DATA FOR LIBRASCOPE SWAPPER AND FAST BAND PACKAGE
970: 
971: IEARLY:        0       ;ENABLE IOP EARLY RESPONSE PRINTOUT
972: 
973: FBQUE:         0       ; TOP OF TASK LIST
974: 
975: SYSBAND:       100B23
976: SYSBND:        100             ; BAND WHERE SYSTEM LIVES
977: DDTBAND:       101B23
978: 
979: FBBANDLIST:    REPEAT 60,<-1>  ;0-57   ;NO DISK HERE ANY MORE
980:                 REPEAT 70-57,<0>        ;60-70 OK
981:                 -1                      ;71 EATS IT
982:                 0                       ;72 OK
983:                 0
984:                 0
985:                 -1                      ;75 LOSES
986:                 REPEAT 101-75,<0>       ;76-101 OK
987:                         -1      ;102    PERMANENT READ ERROR
988:                         -1      ;103    PERMANENTLY BAD!
989:                         -1      ;104    PERMANENT READ ERROR
990:                         -1      ;105    PERMANENT READ ERROR
991:                         0       ;106    OK
992:                         -1      ;107    BAD BAND 2-22-73
993:                         0       ;110    OK
994:                         0       ;111    OK
995:                         -1              ;112 BAD
996:                 REPEAT 131-112,<0>      ;113-131 OK
997:                         -1              ;132 BAD
998:                         0               ;133 OK
999:                         0               ;134 OK
1000:                         0               ;135 OK
1001:                         -1              ;136 BAD
1002:                 REPEAT NBANDS-136,<0>   ;REST OK
1003: 
1004: FBBUSY:        -1
1005: FBTASK:        0
1006: FBACT:         0
1007: FBSPARE:       BLOCK FBSIZ
1008: FBSBUSY:       0
1009: LASTADR:       0               ;LAST SECTOR, TRACK, AND BAND
1010: LASTWC:        0               ;LAST WCMA SENT
1011: IOPWRD:        0               ;WORD IOP GOT PAR ERR ON
1012: IOPWCM:        0               ;IOP WCMA FOR PARITY ERROR, DATA MISS.
1013: 
1014: BEND FBDAT
1015: >
    ALLDAT page# 0016 next  prev
1017: BEGIN LPTDDB
1018: SUBTTL LPTDDB - 10 SEPT 68 - JAM
1019: 
1020: 
1021: ;LPT  DEVICE DATA BLOCK
1022: REPEAT DDBSKW-1,<0>     ; PUT IN PROPER NUMBER OF ZEROS FOR SKEW PURPOSES
1023:                 DEVIBF!DEVLUP,,0                ;INTERNALLY BUFFERED DEVICE
1024: LPTDDB:        SIXBIT  /LPT/
1025:                 XWD     =10*HUNGST,LPTSIZ+2
1026: LPTIOS:        0
1027:                 XWD     XGPDDB,LPTDSP
1028:                 XWD     DVOUT!DVLPT,4403        ;MODES 13,10,1,0
1029:                 0
1030:                 0
1031:                 0
1032:                 XWD     PROG,0
1033: LPTIBF:        BLOCK LPTBLN    ; SYSTEM BUFFER
1034: LPTDCN:        0               ; DANGLING CHARACTER COUNT
1035: LPTBG1:        0               ;SET TO EJECT FORMS BEFORE FIRST OPERATION
1036: LPTUBP:        POINT 7,LPTIBF  ; UUO LEVEL POINTER
1037: LPTIBP:        LPTIBF          ; INTERRUPT LEVEL POINTER
1038: LPTCC:         5*LPTBLN        ;  TOTAL CHARACTER COUNT
1039: LPTLCC:        LPTCPL          ; CHARS PER LINE
1040: 
1041:         BEND LPTDDB
    ALLDAT page# 0017 next  prev
1043: BEGIN XGPDDBSUBTTL DATA STORAGE FOR XGP SERVICE
1044: ;REG JAN 11 1973.  REVISED THRU 8 JUNE 1973
1045: 
1046: REPEAT DDBSKW-1,<0>
1047:                 DEVIBF!DEVLUP,,XGPCSC           ;DEVICE HAS INTERNAL BUFFER.
1048:                                                 ;(SOMETIMES)
1049: XGPDDB:        SIXBIT  /XGP/
1050:                 5*HUNGST,,401                   ;RH = BUFFER SIZE.
1051: XGPIOS:        0
1052:                 ADDDB,,XGPDSP
1053:                 DVLPT!DVLNG!DVOUT,,104401       ;MODES 0,10,17,13
1054:                 0                               ;DEVLOG
1055:                 0                               ;DEVBUF
1056:                 PROG,,0                         ;DEVADR
1057:                 PROG,,0                         ;DEVOAD
1058:                 0
1059:                 0
1060:                 0
1061: 
1062: XGPCSC:        BLOCK   PSYNCN                  ;INTER PROCESSOR SYNCHRONIZATION.
1063: 
1064: XGPP1F:        0                               ;SET TO SIGNAL PDP-10
1065: XGPP2F:        0                               ;SET TO SIGNAL PDP-6
1066: 
1067: XYNCNT:        0                               ;SYNC COUNT
1068: XGPCNT:        0                               ;COUNTS VARIOUS THINGS
1069: XGPCNY:        0                               ;COUNTS PAPER FEED AT END
1070: XGPKIL:        0                               ;SET WHEN PDP-10 WANTS XGP TO DIE.
1071: 
1072: XGPIWD:        0                               ;IOWD FOR CURRENT DUMP COMMAND
1073: XGPBIG:        0                               ;REMAINDER OF IOWD
1074: XGPMDP:        0                               ;POINTER TO CURRENT DUMP COMMAND
1075: XGPNXC:        0                               ;POINTER TO NEXT DUMP COMMAND
1076: XGPROG:        0                               ;RELOC OF USER.
1077: XGPGCW:        0                               ;GROUP CONTROL WORD.
1078: 
1079: XDISP1:        0                               ;DISPATCH LEVEL 1
1080:                 JEN     @XGPCHL                 ;DISMISS INTERRUPT.
1081:                                                 ;JSR XDISP1 TO CHANGE DISPATCH AND
1082:                                                 ;DISMISS.
1083: 
1084: XDISP2:        0                               ;DISPATCH LEVEL 2
1085:                 POPJ    P,
1086: 
1087: XGPAOK:        0                               ;PDP-6 SETS THIS ON EACH INTERRUPT.
1088: XGPBIT:        0                               ;PDP-10 TELLS WHAT IT WANTS HERE
1089: XGPGO:         0                               ;SET BY PDP-10 WHEN JOB LOCKED IN.
1090: XGPTMP:        0                               ;1 CELL FOR I-LEVEL.
1091: XPGOOD:        0                               ;CELL FOR 'GOOD CUTS'.
1092: 
1093: XTAKE:         0                               ;POINTER FOR PDP-6.
1094: XPUT:          0                               ;POINTER FOR PDP-10
1095: XIBUF:         0                               ;CONTAINS THE ADDRESS OF THE BUFFER.
1096: XIBFND:        0                               ;ADDRESS OF END OF BUFFER.
1097: XBFCNT:        0                               ;COUNT OF WORDS USED IN BUFFER.
1098: XGPWSZ:        0                               ;SIZE NEEDED BEFORE REACTIVATION.
1099: XGPBFL:        0                               ;FLAG SET FOR MODE 10, ZEROED FOR 17
1100: 
1101: XGPOST:        BLOCK   20                      ;OLD STATUS OF FC
1102: XGPNST:        BLOCK   20                      ;NEW STATUS OF FC.
1103: XGPFC1:        0                               ;SET WHEN WE WAIT FOR FC
1104: XGPFC2:        0                               ;SET WHEN FC WAITS FOR US
1105: XCLKNM:        0                               ;CLOCK REQUEST IDENTIFIER
1106: XFCJN:         0                               ;FC JOB NUMBER
1107: FCRQER:        0                               ;FLAG FOR FC NOT RESPONDING.
1108: XFCADR:        0                               ;RELATIVE ADDRESS OF THE FC
1109: XFTADR:        BLOCK   20                      ;ADDRESS OF FONT TABLE IN FC
1110: 
1111: XGPSLS:        0                               ;SPECIAL LINE SPACE COUNT. '177'1'42
1112: 
1113: XCFH:          0                               ;CURRENT FONT HEIGHT
1114: XCFBL:         0                               ;CURRENT BASE LINE
1115: XCFCPA:        0                               ;CURRENT COLUMN POSITION ADJUSTMENT.
1116: XHMAX:         0                               ;MAXIMUM HEIGHT IN CURRENT LINE.
1117: XLBL:          0                               ;XLBL CURRENT LINE'S BASE LINE.
1118: XFTCAD:        0                               ;CURRENT FONT ADDRESS (RELOCATED)
1119: XSCNLN:        0                               ;CURRENT SCAN LINE IN LINE
1120: XGPERC:        BLOCK   4                       ;ERROR CONDITION CODES.
1121: XGPPG2:        0                               ;"PAPER PAGE" COUNT
1122: XGPHIP:        0                               ;"HEADING IN PROGRESS"
1123: XGPHDW:        0                               ;IOWD FOR HDB
1124: XGPHDB:        BLOCK   =26                     ;TEXT FOR HEADINGS. USE HDW
1125: XGPAT0:        0                               ;THREE TEMP CELLS FOR 
1126: XGPAT1:        0                               ;PAPER PAGE MACRO EXPANSION.
1127: XGPAT2:        0
1128: XSVCAD:        0                               ;SAVE OLD FONT WHILE IN HEADING.
1129: XGPIGO:        0                               ;SET TO -1 BY PDP6 WHEN DATA XFER
1130: XUSBEG:        0                               ;COLUMN OF BEGINNING UNDERSCORE.
1131: XCHBGO:        0                               ;SET TO ADDRESS OF FIRST TEXT NODE.
1132: XVNODE:        0                               ;SET TO ADDRESS OF VECTOR NODE.
1133: 
1134: ;LIST HEADERS FOR COMPILER/TEXT PROCESS
1135: XVNFL:         0                               ;VECTOR NODE FREE LIST
1136: XTNFL:         0                               ;TEXT NODE FREE LIST
1137: XATLH:         0                               ;ACTIVE TEXT LIST
1138: XASVLH:        0                               ;ACTIVE NARROW VECTOR LIST
1139: XALVLH:        0                               ;ACTIVE WIDE VECTOR LIST
1140: XPENDH:        0                               ;PENDING QUEUE HEAD
1141: XPENDT:        0                               ;PENDING QUEUE TAIL
1142: 
1143: XGPPDX:         BLOCK   20                      ;PDL FOR CHANNEL 4 COMPILER.
1144: XGPPDL:        IOWD    20,XGPPDX               ;POINTER TO PDL
1145: 
1146: XACT4:         0                               ;FLAG CH4 NEEDS ACTIVATION.
1147: XCYPOS:        0                               ;Y POSITION FOR CURRENT LINE.
1148: XGPLYP:        0                               ;LAST Y POSITION QUEUED
1149: XFREBA:        0                               ;POINTER TO BLOCK IN FC.
1150: XNODUS:        0                               ;# OF TEXT NODES IN USE.
1151: XTOFRM:        0                               ;SET TO -1 WHEN THERE IS TEXT Q'ED
1152: XLFTKF:        0                               ;SET TO -1 WHEN WE DID KERN ADJUST
1153: XGPSAC:        BLOCK   20                      ;CH4 CO-ROUTINE AC'S
1154: 
1155: 
1156: XFLAPA:        0                               ;MORE BITS FOR FLAPPER
1157: XFLAPB:        0                               ;BITS TO DECIDE WHEN TO FLAP
1158: XFLAPC:        0                               ;FLAPPER COUNT
1159: XCUTQ:         BLOCK   =48                     ;QUEUE OF CUT POINTS
1160: XCUTBP:        POINT 36,XCUTQ-1,35             ;BYTE POINTER TO XCUTQ
1161: 
1162: ;THE REST OF THIS IS INITIALIZED BY RESET
1163: NTNODE←←=16                                    ;(DEFAULT) NUMBER OF TEXT NODES
1164: NVNODE←←=100                                   ;(DEFAULT) NUMBER OF VECTOR NODES
1165: XGPBL1←←4000                                   ;(DEFAULT) SIZE OF SYSTEM BUFFER
1166: 
1167: XGPPS1:        =200                            ;TOP TO FIRST LINE MARGIN
1168: XGPPS2:        =1790                           ;TOP LINE TO LAST LINE SIZE.
1169: XGPPS3:        =200                            ;LAST LINE TO BOTTOM MARGIN
1170: XGPLMR:        =200                            ;LEFT MARGIN
1171: XGPRMR:        =1650                           ;RIGHT MARGIN
1172: XGPILS:        =4                              ;INTER-LINE SPACING
1173: XNTNOD:        NTNODE                          ;NUMBER OF TEXT NODES
1174: XNVNOD:        NVNODE                          ;NUMBER OF VECTOR NODES
1175: XGPBLN:        XGPBL1                          ;SIZE OF SYSTEM BUFFER
1176: 
1177: XMSET: =200                                    ;SET MARGINS (ETC) FROM THIS BLOCK
1178:         =1790
1179:         =200
1180:         =200
1181:         =1650
1182:         =4
1183:         NTNODE
1184:         NVNODE
1185:         XGPBL1
1186: 
1187: BEND    XGPDDB
    ALLDAT page# 0018 next  prev
1189: BEGIN PTRDDB -- PAPER TAPE READER DEVICE DATA BLOCK
1190: SUBTTL PTRDDB - J. SAUTER - 10-NOV-68
1191: 
1192:                 REPEAT DDBSKW-1,<0>     ; PUT IN ALL THE EXTRA WORDS
1193:                 DEVLUP,,PTRCSC          ; PUT IN ADDRESS OF CONTROL CELLS
1194: PTRDDB:        SIXBIT /PTR/
1195:                 XWD =10*HUNGST,41
1196:                 0
1197:                 XWD PTPDDB,PTRDSP
1198:                 XWD DVPTR+DVIN,14403
1199:                 0
1200:                 0
1201: PTRADR:        XWD PROG,0
1202: PTRPTR:        0
1203:                 0                       ;PTR COUNTER
1204: PTRACT:        0
1205: PTRIN1:        0
1206: PTRADV:        0
1207: PTRSTR:        0
1208: PTRCHR:        0
1209: PTRDSC:        0                       ;SET TO -1 TO MAKE PTR DISCONNECT.
1210: PTRCSC:        BLOCK PSYNCN
1211: PTRCON:        0                       ;SET TO PTRCN1 OR PTRCN2.
1212: 
1213: BEND PTRDDB
    ALLDAT page# 0019 next  prev
1215: BEGIN PTPDDB -- PAPER TAPE PUNCH DEVICE DATA BLOCK
1216: SUBTTL PTPDDB - JAM - 10-NOV-68
1217: 
1218: REPEAT DDBSKW-1,<0>             ; PUT IN PROPER NUMBER OF SKEW WORDS
1219:                 DEVIBF!DEVLUP,,PTPCSC
1220:                                 ; TELL WORLD THAT THIS IS AN INTERNALLY BUFFERED DEVICE . . .
1221:                                 ; AND THAT IT HAS CONTROL CELLS
1222: PTPDDB:        SIXBIT /PTP/
1223:                 XWD =20*HUNGST,41
1224: PTPIOS:        0
1225: IFE IMPSW,<     XWD LPTDDB,PTPDSP>
1226: IFN IMPSW,<     XWD DDBMDL,PTPDSP>
1227:                 XWD DVPTP+DVOUT,14403
1228:                 0
1229:                 0
1230: PTPPTR:        0
1231: PTPADR:        XWD PROG,0
1232: PTPIBP:        0               ; INTERRUPT-LEVEL BYTE POINTER
1233: PTPUBP:        0               ; UUO-LEVEL POINTER
1234: SYSPDL:                        ;SYS INIT PDL MOVED HERE FROM TTY DDB 5/6/74 BH
1235: PTPBUF:        BLOCK PTPBLN    ; BUFFER ITSELF
1236: PTPFCN:        0               ; PUNCH FEED COUNT
1237: PTPBCN:        0               ; BUFFER CHARACTER COUNT
1238: PTPIDS:        0               ; INTERRUPT-LEVEL DISPATCH LOCATION
1239: PTPUDS:        0               ; UUO-LEVEL DISPATCH LOCATION
1240: PTPCPW:        0               ; CHARACTERS PER WORD
1241: PTPACT:        0               ; FLAG ASKING TO TURN ON PTP
1242: PTPMOD:        0               ; MODE OF OPERATION
1243: PTPSID:        0               ; P2 ASKING P1 TO CALL SETIOD
1244: PTPCSC:        BLOCK PSYNCN    ; 2-PROCESSOR SYNCHRONIZATION CONTROL REGISTERS
1245: PTPCON:        0               ; SET TO PTPCN1 OR PTPCN2
1246: 
1247: BEND PTPDDB
    ALLDAT page# 0020 next  prev
1249: BEGIN SCNDDB
1250: ;DESCRIPTION OF DEVICE DATA BLOCK FOR TELETYPES
1251: 
1252: ;THE FUNCTIONS OF THE FIRST EIGHT WORDS ARE AS DESCRIBED IN THE
1253: ;COMMENTS IN THE SYSTEM PARAMETER TAPE( FILE NAME S). LOCATIONS 11
1254: ;THROUGH 27 (OCTAL) RELATIVE TO SCNDDB PERTAIN DIRECTLY TO THE
1255: ;SCANNER SERVICE BUFFERING SCHEME. THE SUBSEQUENT 2*20(OCTAL) LOCATIONS
1256: ;ARE CURRENTLY THE TWO TELETYPE BUFFERS. THEY NEED NOT BE IN THE DDB
1257: ;AS LONG AS THEIR ADDRESSES ARE PLACED IN THE RIGHT HALF OF TTIBUF,
1258: ;AND TTOBUF EITHER AT ASSEMBLY, BUILD OR RUN TIME. IF DYNAMIC
1259: ;BUFFER CONSTRUCTION IS TO BE ADDED THESE BUFFERS MAY BE PLACED ANYWHERE IN
1260: ;FRE CORE STORAGE, AND THE RIGHT HALF OF THE REQUIRED TTXBUF(WHERE "X"
1261: ;MAY BE "I" OR "O")MAY BE LOADED ONLY WHEN THAT BUFFER IS REQUIRED.
1262: 
1263: ;THERE ARE TWO BUFFERS, EACH OF WHICH IS A "RING" UNTO ITSELF:
1264: ;INPUT---POINTED TO BY TTIBUF
1265: ;       ALL CHARACTERS TYPED GO INTO THIS BUFFER. IN ADDITION, ALL
1266: ;OTHER COMMANDS TO BE READ BY THE COMMAND INTERPRETER IN COMCON
1267: ;(APRSER) ARE STORED HERE.
1268: ;OUTPUT BUFFER---POINTED TO BY TTOBUF
1269: ;       ALL CHARACTERS THAT ARE OUTPUT ARE PLACED SEQUENTIALLY IN THIS
1270: ;BUFFER; THIS INCLUDES ECHOED CHARACTERS AS WELL AS NORMAL OUTPUT OF
1271: ;CHARACTER STRINGS.
1272: 
1273: ;THERE ARE NINE BUFFER PARAMETER WORDS ASSOCIATED WITH EACH BUFFER
1274: ;(EXCEPT FOR THE OUTPUT BUFFER, WHICH ONLY NEEDS SIX). THE LAST
1275: ;FOUR CHARACTERS IN THE MNEMONIC DESCRIBES THE FUNCTION OF THE WORD
1276: ;WHILE THE FIRST TWO CHARACTERS IDENTIFY WHICH BUFFER THAT THE
1277: ;FUNCTION APPLIES TO. THE FORMULA FOR THESE WORDS IS TX'FUNC, WHERE
1278: ;THE RELATIVE POSITION OF ALL TX'FNC1 TO TTX'BUF IS THE SAME FOR
1279: ;ALL BUFFERS.  IN THIS MANNER, THE ADDRESS OF TTX'BUF IS LOADED INTO
1280: ;ACCUMULATOR DAT, AND THE RELATIVE POSITIONS FUNCT1-FUNCT9 ARE
1281: ;DEFINED TO BE 0-10 (OCTAL); I.E., FUNCT(DAT) WILL IDENTIFY THE DESIRED
1282: ;BUFFER PARAMETER WORD REGARDLES OF BUFFER.
    ALLDAT page# 0021 next  prev
1284: ;FOLLOWING ARE DEFINITIONS OF THE RELATIVE BUFFER PARAMETER WORDS:
1285: ;TTX'BUF OR BUF(DAT)---THE LEFT HALF CONTAINS NUMBER OF BYTES IN BUFFER AND THE RIGHT
1286: ;       HALF THE ADDRESS OF THE FIRST WORD OF THE BUFFER. THIS WORD IS
1287: ;       ONLY READ BY THE CURRENT CODE.  UPON THE ADDITION OF DYNAMIC
1288: ;       BUFFER ALLOCATION, THIS WORD WOULD BE LOADED IN THE SAME FORMAT
1289: ;       AT THE TIME THAT THE BUFFER WOULD BE BUILT.
1290: ;
1291: ;SCNINI SETS BUFFERS TO LENGTH TTYCHR AT PRESENT. ALSO
1292: ;PRESENT CODE OCCASIONALLY USES TTYCHR RATHER THAN READING LH
1293: ;OF TTXBUF
1294: ;
1295: ;TX'PUTR OR PUTR(DAT)---BYTE POINTER USED TO PLACE CHARACTERS INTO THE
1296: ;       BUFFER. IT MUST ALWAYS BE AHEAD OF OR EQUAL TO THE TAKER POINTER.
1297: ;TX'PCTR OR PCTR(DAT)---COUNT OF NUMBER OF TIMES THAT PUTR MAY BE INCREMENTED
1298: ;       BEFORE REACHING THE LAST BYTE IN THE LAST WORD OF THE BUFFER
1299: ;       (NOT THE AMMOUNT OF FREE SPACE LEFT)
1300: ;TX'TAKR OR TAKR(DAT)---BYTE POINTER USED BY ALL ROUTINES TO PICK UP
1301: ;       CHARACTERS FROM THE BUFFER. WHEN THE TAKR IS EQUAL TO THE PUTR,
1302: ;       THE BUFFER IS "EMPTY".
1303: ;TX'TCTR OR TCTR(DAT)---COUNT OF THE NUMBER OF TIMES THAT THE TAKR CAN
1304: ;       BE INCREMENTED BEFORE REACHING THE PHYSICAL END OF THE BUFFER.
1305: ;TX'FCTR OR FCTR(DAT)---FREE CHARACTER COUNT; I.E., HOW MANY TIMES MAY THE
1306: ;       PUTR BE INCREMENTED BEFORE IT WOULD COME AROUND AND "STEP ON"
1307: ;       THE TAKR. WHEN THE FREE CHAR. COUNT IS ZERO, NO MORE CHARACTERS
1308: ;       MAY BE PLACED IN THE BUFFER (USUAL RESULT IS GOING INTO IO WAIT)
1309: ;TX'SYNC OR TSYNC(DAT)---COUNT OF NUMBER OF "LINES" THAT HAVE BEEN TYPED
1310: ;       INTO INPUT BUFFER.
    ALLDAT page# 0022 next  prev
1312: ;SCANNER DEVICE DATA BLOCK.
1313: ;REMAINING SCN DDB'S ARE GENERATED
1314: ;OUT OF LINE AT BUILD TIME.
1315: ;THIS DDB IS USED FOR THE CTY AND NEVER KILLED   BH 5/6/74
1316: 
1317: OFFSET←←5      ;NUMBER OF COMPILED IN DDBS
1318: TTPLEN←←SCNNUM+DPYNUM+DDNUM+PTYNUM+1
1319: 
1320: Z←←0;
1321: LINK←←0
1322: REPEAT DDBSKW,<XWD DEVAOA,0>            ;IGNORE IOACT FOR OUTPUT UUO
1323: SCNDDB:
1324: TTYLST:
1325:         ZZ←.
1326:         SIXBIT /CTY/                    ;DEVNAM
1327:         TCONLN13+UTTYBF+1              ;DEVCHR(NO HUNG TIME),,BUFFER SIZE+1
1328:         Z                               ;DEVIOS
1329:         XWD     LINK,SCNDSP             ;DEVSER
1330:         XWD     DVTTY+DVIN+DVOUT,15403  ;DEVMOD (ALLOWS MODES 0,1,10,11,13,14)
1331:         Z                               ;DEVLOG
1332:         Z                               ;DEVBUF
1333:         XWD     PROG,0                  ;DEVIAD
1334:         XWD     PROG,0                  ;DEVOAD
1335:         XP      ACTBTS,.-ZZ             ;BREAK TABLE
1336:         -1
1337:         777700,,37600
1338:         374000
1339:         XP      ACTMOD,.-ZZ             ;END OF TABLE AND SPECIAL BITS
1340:         7,,600000
1341:         XP      TTYPTR,.-ZZ             ;TTYPTR
1342:         Z
1343:         XP      TTIBUF,.-ZZ
1344:         XP      TTICHR,STTIBF*4         ;9 BIT CHARACTERS FOR INPUT
1345:         XWD     TTICHR,TTYLST+TIBF-1
1346:         XP      TIPUTR,.-ZZ
1347:         1100,,TTYLST+TIBF
1348:         XP      TIPCTR,.-ZZ
1349:         1
1350:         XP      TITAKR,.-ZZ
1351:         1100,,TTYLST+TIBF
1352:         XP      TITCTR,.-ZZ
1353:         1
1354:         XP      TIFCTR,.-ZZ
1355:         TTICHR
1356:         XP      TISYNC,.-ZZ
1357:         Z
1358:         XP      TTOBUF,.-ZZ
1359:         XP      TTOCHR,STTOBF*5         ;7 BIT OUTPUT
1360:         XWD     TTOCHR,TTYLST+TOBF-1
1361:         XP      TOPUTR,.-ZZ
1362:         700,,TTYLST+TOBF
1363:         XP      TOPCTR,.-ZZ
1364:         1
1365:         XP      TOTAKR,.-ZZ
1366:         700,,TTYLST+TOBF
1367:         XP      TOTCTR,.-ZZ
1368:         1
1369:         XP      TOFCTR,.-ZZ
1370:         TTOCHR
1371:         XP      PTYPTR,.-ZZ
1372:         Z
1373:         XP      SAVDDB,.-ZZ             ;FOR FILES COMMAND
1374:         Z
1375:         XP      IMLHAC,.-ZZ             ;BITS 34:35 HOLD IMLAC BUCKY BITS.
1376:         Z
1377:         XP      TIBF,.-ZZ
1378:         BLOCK   STTIBF                  ;THE ACTUAL INPUT BUFFER
1379:         XP      TOBF,.-ZZ
1380:         BLOCK   STTOBF                  ;THE ACTUAL OUTPUT BUFFER
1381: ;NO. OF CHAR. IN MON. BUF.
1382:         XP      SCNDDS,.-ZZ             ;SIZE OF SCN DDB
    ALLDAT page# 0023 next  prev
1384: LINSAV: 0
1385: LINSV1: 0
1386: ↑↑TTYLOK:       0
1387: DKBCHR:        0
1388: GLOBAL TTPLEN
1389:         0       ;LINTAB(-1) FOR DDBSRC
1390: LINTAB: BLOCK TTPLEN
1391: GLOBAL PTYNUM
1392: PTYJOB:        BLOCK PTYNUM
1393: 
1394: BEND SCNDDB
    ALLDAT page# 0024 next  prev
1396: ;DIALER DATA AREA
1397: BEGIN DILDAT
1398: 
1399: ;AC SAVE LOCS
1400: DILLIN:        0
1401: DILTAC:        0
1402: DILJ:          0
1403: 
1404: ;THIS PART ZEROED AT DILINI
1405: DILZBG←←.
1406: DILJOB:        BLOCK DILNUM    ;JOB # OF JOB OWNING THIS DIALER
1407: DILCNI:        BLOCK DILNUM    ;LAST CONI BITS FROM DILINT
1408: DILIDS:        BLOCK DILNUM    ;DILINT DISPATCH ADDRESS
1409: DILZND←←.-1
1410: 
1411: BEND DILDAT
    ALLDAT page# 0025 next  prev
1413: BEGIN MTCDDB  --  DEVICE DATA BLOCK FOR MAG TAPES.
1414: SUBTTL MTCDDB - J. SAUTER, STANFORD, MAG. TAPE DEVICE DATA BLOCKS
1415: 
1416: 
1417: GLOBAL SCNDDB
1418: LINK←SCNDDB
1419: 
1420: DEFINE CAT6'(A,B),<SIXBIT /A'B/>
1421: 
1422: DEFINE MTCDDX(UNIT),<
1423:         REPEAT DDBSKW-1,<0>     ;SKEW-ZEROS
1424:         DEVLUP,,0
1425:         ZZ←.
1426: IFE UNIT,<↑MTCDDB←.>
1427:         CAT6(MTA,\UNIT)
1428:         XWD     =60*HUNGST,MTSIZ+1+<UNIT>PUNITP
1429:         0
1430:         XWD LINK,MTCDSP
1431:         LINK←.-4
1432:         XWD DVMTA!DVIN!DVOUT!DVLNG,154403
1433:         0
1434:         0
1435:         XWD PROG,0
1436:         XWD PROG,0
1437: MTCENT←.-ZZ
1438:         0       ;ERROR COUNT FOR THIS UNIT:
1439:                         ;0-8 = LOGN. P.E.
1440:                         ;9-17 = LAT. P.E.
1441:                         ;18-26 = ILL OP.
1442:                         ;27-35 = DATA MISSED.
1443: MTCBKN←.-ZZ
1444:         0       ;RECORD COUNTER
1445: >
    ALLDAT page# 0026 next  prev
1447:         UNIT←MTCNUM-1
1448: ; THE FOLLOWING IS XLIST'ED OUT FOR YOUR READING CONVENIENCE
1449: ; IT ACTUALLY LOOKS LIKE THIS:
1450: ; REPEAT MTCNUM,<MTCDDX(UNIT)
1451: ;       UNIT←UNIT-1>
1452: XLIST
1453:         REPEAT MTCNUM,<MTCDDX(UNIT)
1454:         UNIT←UNIT-1>
1455: LIST
1456: 
1457: ;TEMP CELLS AND CONTROL DATA
1458: MTEOFF:        0       ;EOF FLAG
1459: MTDEV:         0       ;XWD COMMAND,DDB ADDR
1460: MTDCCN:        0       ;BLKO/BLKI POINTER FOR REDO
1461: DCWRD:         0       ;BLKO/BLKI POINTER FOR DC
1462: MTCSAV:         0       ;DC COMMAND
1463: MISSED:        0       ;-1 IF DC HAS PARTIAL WORD
1464: MTERCN:        0       ;ERROR COUNTER
1465: MTREWN:        0       ;UNITS REWINDING AND IN IOW -1=NONE, 0=ONE
1466: MTCMDP:        0       ;DUMP COMMAND LIST POINTER
1467: SVCNTR:        0       ;DUMP COMMAND IOWD NEG. WORD COUNT
1468: MDCSAV:        0
1469: MTIDSP:        0       ;ADDRESS TO TRANSFER TO ON NEXT MAG TAPE INTERRUPT
1470: 
1471: MTDCND:        0       ;JSR HERE WHEN BLKO/BLKI COUNTED OUT
1472:                 JRST MTDCN1
1473: 
1474:         BEND MTCDDB
    ALLDAT page# 0027 next  prev
1476: BEGIN SPWDAT -- DATA FOR SPACEWAR
1477: SUBTTL SPWDAT - JAM, STANFORD, 7-NOV-68, DATA FOR SPACEWAR SERVICE
1478: 
1479: 
1480: SPWA:  BLOCK 20        ; P1 ACCUMULATORS
1481: SPWB:  BLOCK 20        ; P2 ACCUMULATORS
1482: SPWSAC:BLOCK 20        ; USER'S ACCUMULATORS
1483: SP2SAC:BLOCK 20
1484:         0               ; JOB NUMBER OF JOB WHICH HAS 
1485:                         ; PDP-6 SPACEWAR ASSIGNED.
1486: SPWBUT:
1487:         0               ; SPACEWAR BUTTONS
1488: SPWACT:
1489:         0               ; FLAG MEANING A SPACEWAR JOB EXISTS
1490: SPWCSC:
1491:         BLOCK PSYNCN    ; SPACEWAR 2-PROCESSOR SYNCHRONIZATION CELLS
1492: 
1493: ;WARNING! DON'T CHANGE POSITION OF SPWGO,SP2GO,JBTST2 - SEE SPWINI - REG
1494: SPWGO: BLOCK   JOBN    
1495: SP2GO: BLOCK   JOBN
1496: JBTST2:BLOCK   JOBN
1497: 
1498:         BEND SPWDAT
    ALLDAT page# 0028 next  prev
1500: ;SCHEDULER DATA AREA . . .
1501: BEGIN SCHDAT
1502: SUBTTL  SCHDAT 11 SEPT 67 SCHEDULER DATA AREA
1503: 
1504: ;SCHEDU DATA
1505: 
1506: 
1507: SCHMQT:        QQMQT
1508: JOBQUE:        BLOCK JOBN      ; MINUS THE QUEUE NUMBER THE JOB IS IN
1509: ; TABLES FOR JOB PRIORITY CALCULATIONS
1510: 
1511: SCHBEG:                        ;HERE TO SCHEND ZEROED BY NXTINI
1512: JLCYET:        0
1513: JLFACTOR:      0               ;JLFACTOR/JLTIME = USEFUL PROCESSOR LEVEL
1514: RJLFACTOR:     0               ;RECIPROCAL JLFACTOR
1515: OINTIME:       0               ;HERE WE SAVE INTIME+P1PID FROM LAST JLCAL CYCLE
1516: OUTIME:        0               ;HERE WE SAVE UPTIME+P1PID FROM LAST JLCAL CYCLE
1517: JLRIT:         0               ;RECENT INTERUPT FRACTION *1000
1518: ORDYET:        0
1519: JBTPRI:        BLOCK JOBN      ; JOB'S PRIORITY
1520: JBTNPR:        BLOCK JOBN      ; JOB'S NEW PRIORITY
1521: JBTJL:         BLOCK JOBN      ; POINTER TO FS TABLE OF INSTANTANEOUS JOB LOAD
1522: JBTJLH:        BLOCK JOBN      ; OLDEST JOB LOADING.
1523: SCHEND←←.-1
1524: 
1525: GCBITS:        BLOCK 2         ;BIT TABLE FOR GCMCK ROUTINE
1526: 
1527: ; QUEUE TABLES . . .
1528:                 BLOCK MXQUE
1529: JBTQ:          BLOCK JOBN
1530: 
1531: IFN FTSWAP,<
1532: ; SWAPPER TABLES . . .
1533: 
1534: SWPJMX:        0
1535: SWPMXP:        0
1536: SWPLMX:        0
1537: SWPLMJ:        0
1538: JBTSWP:        BLOCK JOBN
1539: JB2SWP:        BLOCK JOBN      ;LH LIKE JBTSWP FOR SPARE COPY OF SEGMENTS
1540:                                 ;30-35 DATA DISC CHANNEL LIST. 18-29 AVAILABLE.
1541: ;LEAVE NEXT LOCS IN ORDER FOR WHO
1542: BIGHOL:        0               ;CURRENT BIGGEST HOLE IN CORE (1K BLOCKS)
1543: FINISH:        0               ;FINISH,FORCE,FIT AND XPANDF ARE FLAGS IN SWAP
1544: FORCE:         0               ; NUMBER OF THE JOB THAT WILL GO OUT NEXT
1545: FIT:           0               ; NUMBER OF THE JOB THAT WILL COME IN NEXT
1546: XPANDF:        0
1547: FULCNT:        0               ;PRINT DISK IS FULL EVERY 30 SECONDS
1548: SEGWAIT:       0               ; NUMBER OF JOB WAITING FOR UPPER SEGMENT
1549: MAXSIZ:        0               ;SIZE OF LARGEST JOB WHICH MIGHT BE SWAPPED OUT
1550: MAXJBN:        0               ;NUMBER OF THAT JOB
1551: MAXRSZ:        0               ; SIZE OF LARGEST RUNNABLE JOB
1552: MAXRJB:        0               ; JOB NUMBER OF LARGEST RUNNABLE JOB.
1553: MAXSSZ:        0               ; SIZE OF LARGEST SEGMENT.
1554: MAXSJB:        0               ; JOB NUMBER OF LARGEST SEGMENT.
1555: SUMCOR:        0               ; THE SWAPPER TOTALS THE CORE SIZES OF THE JOBS
1556:                                 ; IT IS CONSIDERING FOR SWAPOUT AND PUTS THAT TOTAL HERE
1557: NEEDED:        0               ;THE AMOUNT NEEDED TO SWAP JOB IN FIT IN
1558: >
1559: 
1560: ;SHARABLE DEVICE JUST BECOME AVAILABLE(EXTENDED TO OTHER QUEUES TOO)
1561: ;APPROPRIATE ENTRY IS SET NON-ZERO WHEN SCHEDULER SHOULD LOOK
1562: ;AT THAT QUEUE TO FIND A JOB TO RUN
1563: ;WSAVAL CONTAINS THE NO. OF JOBS WITH IO WAIT SATISFIED(0=NONE)
1564: 
1565: DEFINE X!(A)
1566: <
1567: A!AVAL:        0
1568: >
1569: 
1570: AVALTB:        QUEUES          ;GENERATE THE AVAL FLAGS
    ALLDAT page# 0029 next  prev
1572: ;SHARABLE DEVICE REQUEST TABLE(GENERALIZED FOR OTHER QUEUES TOO)
1573: ;CONTAINS THE NUMBER OF JOB WAITING TO USE SHARBLE DEVICE
1574: ;WSREQ AND RNREQ ARE UNUSED
1575: 
1576: DEFINE X!(A)
1577: <↑A!REQ:        0
1578: >
1579: 
1580: 
1581: REQTAB:        QUEUES  ;GENERATE REQ TABLE
1582: 
1583: ;WORDS USED TO "REMEMBER" JOB NUMBERS
1584: ;BITS 35--9 CORRESPOND TO JOB NO'S 1--27
1585: 
1586: 
1587: QJOB:  BLOCK JOBN      ;Q TRANSFERS AT OTHER THAN CLOCK LEVEL
1588: IFN FTSWAP,<
1589: XJOB:  BLOCK JOBN      ;CORE EXPANSION BY SWAPOUT-IN
1590: >
1591: 
1592: ;DATA AND STORAGE AREA USED FOR SWAPPING.  ON THE LIBRASCOPE
1593: ;   DISK, BANDS 1-15 ARE USED FOR SWAPPING, EACH BAND
1594: ;   CONTAINING 76K WORDS.
1595: 
1596: SQREQ: 0                       ;C(LH)=NEG. OF SIZE OF READ/WRITE
1597:                                 ;C(RH)=LOC. OF FIRST WORD TO READ/WRITE
1598: SERA:  0                       ;SIGN IS 1 IF A READ
1599:                                 ;C(RH)=BLOCK NUMBER BEFORE READING,
1600:                                 ;    ERROR BITS AFTER READING.
1601: SWPCNT:        0               ;SWAPPER COUNTER.  WHEN LEQ 0, RESET TO
1602:                                 ;INITIAL VALUE AND RUN SWAPPER.
1603: SERACT:        0                       ;COUNTER FOR ERRORS
1604: CORMX:         0                       ; MAXIMUM CORE AVAILABLE TO LOSERS
1605: ISONE:         0                       ; BOOLEAN SAYING THERE IS A JOB WHICH CAN FIT IN WITH THIS UPPER
1606: 
1607: XP CONVMD,3
1608:         ;CONVERSION FROM 1K CORE BLOCKS TO DISK BLOCKS
1609:         ;(SHIFT COUNT)
1610:         BEND SCHDAT
    ALLDAT page# 0030 next  prev
1612: SUBTTL  DATA AREA FOR CORE MANAGEMENT SYSTEM
1613: ;        - JAM 8-24-69          - REG 2-24-72
1614: 
1615: RMEMSI: 0               ;FIRST PHYSICAL NXM ADDRESS
1616: MEMSIZ: 0               ;LOGICAL NXM FOR SYSTEM = FREE STORAGE LOCATION
1617: CORCSC: BLOCK   PSYNCN  ;P2 CAN PLAY WITH CORE CELLS!
1618: CORBEG←←.               ;HERE TO COREND ZEROED BY CORINI
1619: FSBPT:  0               ;BYTE POINTER TO 2ND BYTE IN CORTAB
1620: CORBLK←←=256            ;THE MAXIMUM NUMBER OF K WE MIGHT HAVE
1621: CORTAB: BLOCK 101       ;9 BITS PER K OF MEMORY
1622: CORLST: 0               ;BYTE POINTER TO 2 ND BIT OF NXM IN CORTAB
1623: CORTAL: 0               ;THE NUMBER OF 1K HOLES IN CORE
1624: IFN FTSWAP,<
1625: CORMAX: 0               ;LARGEST POSSIBLE JOBREL
1626: >
1627: SHFWAT: 0               ;# OF JOB WAITING TO BE SHUFFLED
1628: HOLEF:  0               ;ADDRESS OF 1ST HOLE IN CORE
1629: CORE2P: 0               ;POINTER TO LAST BYTE OF SYSTEM IN CORTAB
1630: COREND←←.-1             ;END OF AREA ZEROED BY CORINI
1631: %SWPL←←=196*2000       ;SWAPPING LIMIT - MAX JOB SIZE
1632: SWAPLI: %SWPL           ;CORE CELL WITH SWAPPING LIMIT SET.
1633: JBTPLN←←136            ;SIZE OF JOB PDL HELD IN FREE STORAGE.
1634:                         ;SOME OF THE JOBPDL IS RESERVED FOR JOBDATA AREA
1635: 
1636: LOCKNO: 0               ;JOB NUMBER OF USER OF THE LOCK UUO.
1637: LOKPOS: 0               ;PROT,,REL WE DESIRE FOR JOB IN LOCKNO.
1638: LOKTOP: 0               ;BOTTOM OF USER CORE.
    ALLDAT page# 0031 next  prev
1640: SUBTTL  FREE STORAGE PARAMETERS
1641: IFN FTSWAP,<FSNINIT←←1;>FSNINIT←←5      ;NUMBER OF K TO CLAIM INITIALY
1642: TSHF←←3                 ;COARSENESS OF FREE STORAGE (EXPONENT OF 2)
1643: TRIVIAL←←1TSHF        ;SIZE OF MINIMUM BLOCK
1644: NFSB←←20                ;NUMBER OF DISTINGUISHABLE BLOCK SIZES
1645: FSBEG←←.                ;ADDRESS TO ZERO AT FSINI
1646: FSCSC:  BLOCK   PSYNCN  ;SYNCHRONIZATION CELLS FOR FS
1647: FSCNT:  0               ;COUNT OF PEOPLE WAITING FOR F.S.
1648: FSLIST: BLOCK   JOBN    ;AND THEIR JOB NUMBERS
1649: JBTPDL: BLOCK   JOBN    ;PDL POINTER FOR UUO PDL FOR EACH JOB
1650: FSCLKF: 0               ;FLAG TO THE SWAPPER THAT FS IS EXPANDING
1651: FSGVKF: 0               ;FLAG TO SAY LOOK FOR A K TO GIVE BACK
1652: FSRTL:  0               ;LIST OF BLOCKS TO BE RETURNED
1653: FSNEWK: 0               ;SET TO -1 WHEN MERGING IN A NEW 1K CHUNK
1654: FSCKCT: 0               ;COUNT TICKS UNTIL COMPUTING CHECKERBOARDING
1655: FSBUSY: 0               ;AMOUNT OF FS THAT'S IN USE RIGHT NOW.
1656: FSAVB:  BLOCK   2*NFSB  ;BASES FOR LISTS OF FREE BLOCKS
1657: FSRPQ:  BLOCK   NFSB    ;COUNT OF FS REQUESTS BY SIZE
1658: FSBLUZ:0                ;COUNT NUMBER OF TIME FSBUSY IS FUCKED UP.
1659: FSNCLK: 0               ;SET WHEN YOU NEED FSCLK CALLED.
1660:                         ;OR OF FSRTL,FSCLKF, AND FSGVKF
1661: FSIPTR: FSLIST          ;POINTER TO ADD JOBS TO FSLIST
1662: FSOPTR: FSLIST          ;POINTER TO TAKE JOBS FROM FSLIST
1663: FSHUNG: 0               ;SET TO -1 TO INDICATE A DISASTER.
1664: FSGTUF: 0               ;FLAG FOR SPECIAL FSGET
1665: SPFSNT: 0               ;TOTAL # SPARES NEEDED
1666: FSEND←←.-1              ;END OF BLOCK ZEROED BY FSINI
    ALLDAT page# 0032 next  prev
1668: ;SPARE LIST CONTROL BLOCKS
1669: ;FORMAT OF SPARE LIST HEADER
1670: 
1671:                 ;WD0 LIST HEADER
1672: SFSIZE←←1       ;B0 AVOID REG FS, 1-8 # TO KEEP, RH SIZE
1673: SFLINK←←2       ;HEADER LINK (BOTH WAYS)
1674: SPFSN←←3        ;# SPARES CURRENTLY NEEDED
1675: SFLOSS←←4       ;LH TYPE (TEXT) RH LOSS COUNT
1676: 
1677: SFNWT←←200000   ;PREVENTS WAITING AT UUO LEVEL
1678: 
1679: NSPLN←←3        ;# SPARES OF STUFF ALLOC PER LINE
1680: 
1681: SFHEAD: DPYFS,,DDFS     ;THE HEADER HEADER
1682: 
1683: DDFS:   0               ;DD Q BLOCKS
1684:         400000+NDDSPQ9,,QLENGT
1685:         TTYFS
1686:         0
1687:         [ASCIZ /DATA DISK QUEUE/],,
1688: 
1689: TTYFS:  0               ;TTY DDBS
1690:         NSPLN9,,SCNDDS+DDBSKW+1
1691:         DDFS,,DHFS
1692:         0
1693:         0
1694: 
1695: DHFS:   0               ;DPY HEADERS
1696:         NSPLN9,,DPYLEN
1697:         TTYFS,,LPFS
1698:         0
1699:         0
1700: 
1701: LPFS:   0               ;LINE PNTR TABLES
1702:         NSPLN9,,=80
1703:         DHFS,,PPFS
1704:         0
1705:         0
1706: 
1707: PPFS:   0               ;PAGE PRINTER INITIAL BLOCKS
1708:         NSPLN*29,,BLKSIZ       ;2 OF THESE PER PP
1709:         LPFS,,DPYFS
1710:         0
1711:         0
1712: 
1713: DPYFS:  0               ;RANDOM DPYSER DATA
1714:         BLKSIZ
1715:         PPFS,,
1716:         0
1717:         0
    ALLDAT page# 0033 next  prev
1719: BEGIN TVDDB -- TV CAMERA DEVICE DATA BLOCK
1720: SUBTTL TVDDB - J. SAUTER, STANFOR, 25-FEB-68, TV CAMERA DEVICE DATA BLOCK
1721: 
1722: 
1723: 
1724:         REPEAT DDBSKW-1,<0>     ; EXTRA STANDARD DDB WORDS
1725:         DEVLUP,,0
1726: TVDDB: SIXBIT /TV/
1727:         XWD =2*HUNGST,0
1728:         0               ;TVIOS, NOT USED.
1729: IFE ELFNUM <XWD DTCDDB,TVDSP>
1730: IFN ELFNUM <XWD ELFDDB,TVDSP>
1731:         XWD DVTV!DVIN!DVLNG,100000
1732:         0
1733:         0
1734:         XWD PROG,0
1735:         XWD PROG,0
1736:         0
1737:         0
1738:         0               ;DEVACC
1739:         0               ;DEVCNT
1740:         0               ;DEVBLK
1741:         0               ;DEVBKO
1742:         0               ;DSKBUF
1743:         0               ;DSKCNT
1744:         0               ;SETCNT
1745: 
1746: 
1747:         BEND TVDDB
    ALLDAT page# 0034 next  prev
1749: IFN ELFNUM <SUBTTL ELFDDB - PDP-11 BARE MACHINE MODE
1750: BEGIN ELFDDB - 7 MAY 74 BO
1751: 
1752: REPEAT DDBSKW-1,<0>
1753:                 DEVIBF!DEVLUP,,0        ;It sort of has an internal buffer
1754: ELFDDB←.                               ;(at least, it doesn't set IOACT).
1755:                 SIXBIT /ELF/
1756:                 0
1757:                 0
1758:                 XWD DTCDDB,ELFDSP
1759:                 XWD DVOUT+DVIN+DVLNG,140000     ;Dump mode only for now.
1760:                 0
1761:                 0
1762:                 XWD PROG,0
1763:                 XWD PROG,0
1764: ELFLOC←.
1765:                 0                       ;ELFSER defines its variables
1766:                 0                       ;in terms of ELFLOC.
1767:                 0
1768:                 0
1769: 
1770: BEND ELFDDB
1771: ELFDDB←ELFDDB
1772: ELFLOC←ELFLOC
1773: >;IFN ELFNUM
    ALLDAT page# 0035 next  prev
1775: BEGIN ADDDB -- DEVICE DATA BLOCK FOR A/D AND D/A.
1776: SUBTTL ADDDB - J. SAUTER, STANFORD, 25-FEB-68, AD DEVICE DATA BLOCK
1777:         REPEAT DDBSKW-1,<0>     ; EXTRA DDB WORDS
1778:                 DEVLUP,,0
1779: ADDDB:         SIXBIT /AD/
1780:                 XWD =24*HUNGST,0
1781:                 0               ;ADIOS
1782:                 XWD     ADCDDB,ADDSP
1783:                 XWD DVOUT+DVIN+DVLNG,140000     ;FLUSH MODE 15 8/7/73
1784:                 0
1785:                 0
1786:                 XWD PROG,0
1787:                 0
1788: ADLOC1:        0
1789: ADLOC2:        0
1790: ADLOC3:        0
1791: ADLOC4:        0
1792: ADBKO:         0
1793: ADERR:         0
1794: ADADV:         0
1795: ADBLK:         0
1796: ADACT:         0
1797: ADBKX: 0
1798: ADJSR: 0
1799: ADJSRL:        0
1800: 
1801: AD2INT:  0
1802:         EXCH TAC,ADBKO
1803:         EXCH TAC,ADADV
1804:         JUMPL TAC,CONT
1805:         MOVE TAC,AD2INT ;MAKE IT LOOK LIKE THE INTERRUPT WENT OFF ON
1806:         MOVEM TAC,@ADJSR                ;THE NORMAL CHANNELL.
1807:         MOVE TAC,ADBKO
1808:         JRST ADINT
1809: CONT:   EXCH TAC,ADBKO
1810:         JRST 12,@AD2INT
1811: 
1812: 
1813:         BEND ADDDB
    ALLDAT page# 0036 next  prev
1815: BEGIN ADCDDB - NEW AD/DA CONVERTER - (JAM 2-5-74)
1816: SUBTTL ADCDDB - DEVICE DATA BLOCK FOR NEW AD/DA CONVERTER
1817: 
1818:         REPEAT DDBSKW-1,<0>
1819:         DEVLUP,,ADCCSC
1820: ADCDDB:SIXBIT /ADC/            ; ANALOG-DIGITAL. INPUT ONLY.
1821:         77*HUNGST,,0
1822: ADCIOS:0
1823:         DACDDB,,ADCDSP
1824:         DVIN!DVLNG,,140000
1825:         0
1826:         0
1827:         0
1828:         0
1829: ADCCSC:BLOCK PSYNCN
1830: ADCZB:         ; BEGINNING OF BLOCK TO ZERO AT INITIALIZE TIME
1831: ADCBKI:0       ; CURRENT IOWD
1832: ADCNBK:0       ; NEXT IOWD
1833: ADCRCB:0       ; STARTUP IOWD FOR RECYCLE MODE
1834: ADCTHR:0       ; THRESHHOLD FOR RECYCLE MODE
1835: ADCCNO:0       ; CONO WORD TO START UP
1836: ADCERA:PROG,,0 ; ADDRESS OF PLACE IN USER CORE TO PUT ERROR CODES
1837: ADCRUN:PROG,,0 ; ADDRESS OF USER CORE WD TO 'SETOM' WHILE ADC RUNNING
1838: ADCRCW:PROG,,0 ; ADDRESS OF USER CORE WD TO PUT RECYCLE IOWD WHEN DONE
1839: ADCP1L:0       ; P1'S SYNC LOCATION
1840: ADCP2L:0       ; P2'S SYNC LOCATION
1841: ADCSTI:0       ; STRAY ADC INTERRUPTS
1842: ADCWPS:0       ; WORDS PER SECOND AT THIS CLOCK RATE AND PACKING
1843: ADCZND:        ; END OF BLOCK TO ZERO
1844: 
1845: ADCTAC:0       ; SAVED ACCUMULATOR FOR I-LEVEL (MUSN'T ZERO THIS!)
1846: ADCNOH:0       ; WHEN ≠0, INHIBITS HUNG TIMEOUT
1847: 
1848: 
1849:         REPEAT DDBSKW-1,<0>
1850:         DEVLUP,,DACCSC
1851: DACDDB:SIXBIT /DAC/
1852:         77*HUNGST,,0
1853: DACIOS:IO,,0
1854:         TVDDB,,DACDSP
1855:         DVOUT!DVLNG,,140000
1856:         0
1857:         0
1858:         0
1859:         0
1860: DACCSC:BLOCK PSYNCN
1861: DACZB:         ; BEGINNING OF BLOCK TO ZERO AT INITIALIZE TIME
1862: DACBKO:0       ; CURRENT IOWD
1863: DACNBK:0       ; NEXT IOWD
1864: DACCNO:0       ; CONO WORD TO START UP
1865: DACERA:PROG,,0 ; ADDRESS OF USER CORE WD TO PUT ERROR CODES
1866: DACRUN:PROG,,0 ; ADDRESS OF USER CORE WD TO `SETOM' WHILE DAC RUNNING
1867: DACP1L:0       ; P1'S SYNC LOCATION
1868: DACP2L:0       ; P2'S SYNC LOCATION
1869: DACSTI:0       ; STRAY DAC INTERRUPTS
1870: DACWPS:0       ; WORDS PER SECOND AT THIS CLOCK RATE AND PACKING
1871: DACZND:        ; END OF BLOCK TO ZERO
1872: 
1873: BEND ADCDDB
    ALLDAT page# 0037 next  prev
1875: BEGIN APRDATSUBTTL  APRDAT 7 NOV 68 APRSER DATA
1876: IFN FTBAT,<
1877: BATYET:        =10*JIFSEC              ;START AFTER 10 SECONDS
1878: BATPNT:        0                       ;POINTER INTO BATMAN, ROBIN AND BATFLG
1879: 
1880: ;ZERO IN EITHER BATMAN OR ROBIN MEANS NO RUN!
1881: BATMAN:        '[ONCE]'        ;SYSTEM STARTUP HELPER
1882:                 '*SPY* '        ;ACCOUNTING
1883:                 '[LIST]'        ;NEW SPOOLER
1884:                 '[XSPL]'        ;XGP SPOOLER
1885:                 '*-SL-*'        ;SERVICE LEVEL MONITOR
1886:                 '[-NS-]'        ;NEWS SERVICE (AP)
1887:                 '<RMND>'        ;REMINDER FANTOM
1888: IFN IMPSW,<     'LOGGER'        ; IMP MESSAGE SWITCHER  >
1889: IFN FTHG, <     '*-HG-*'        ;STATISTIC GATHERER     >
1890:                 'PONYSY'        ;PRANCING PONY BILLING SYSTEM
1891:                 0               ;1 PATCH SPACE
1892: BATLEN←←.-BATMAN
1893: 
1894: ROBIN:         '  1  2'        ;SYSTEM STARTUP HELPER, (HEAVY)
1895:                 'ACTSYS'        ;ADDRESS OF THIS GUY
1896:                 'SPLSYS'        ;NEW SPOOLER
1897:                 'SPLSYS'        ;XGP SPOOLER
1898:                 ' SLSYS'        ;LOC OF SL MONITOR
1899:                 ' NSSYS'        ;NEWS SERVICE (AP)
1900:                 'RMDSYS'        ;REMINDER
1901: IFN IMPSW,<     'NETSYS' >
1902: IFN FTHG, <     ' HGSYS'        ;STATISTICS PROPRIETOR  >
1903:                 'PNYSYS'        ;PRANCING PONY SYSTEM
1904:                 0               ;PATCH AREA
1905: 
1906: ;ALFRED, THE FAITHFUL BUTLER.
1907: ALFRED:        BLOCK   BATLEN  ;SPACE FOR TIME REQUESTS
1908: 
1909: ;POLICE COMMISSIONER GORDON MEMORIAL TABLE (PLEASE REMOVE YOUR FEET)
1910: ;PRIVILEGES FOR PHANTOMS
1911: GORDON:        PRIPRV!DEVPRV!LUPPRV,,0 ;SYS STARTER CAN DO ANYTHING!
1912:                 MESPRV!LUPPRV,,0        ;SPY (NEEDS MES FOR AUTOLOGOUT)
1913:                 REAPRV!MESPRV!LUPPRV,,0 ;LPT SPOOLER
1914:                 REAPRV!MESPRV!LUPPRV,,0 ;XGP SPOOLER
1915:                 SSLPRV!LUPPRV,,0        ;SERVICE LEVEL SYSTEM
1916:                 REAPRV!LUPPRV,,0        ;NEWS SERVICE (AP)
1917:                 LUPPRV,,0               ;REMINDER
1918: IFN IMPSW,<     0                       ;LOGGER         >
1919: IFN FTHG, <     ACWPRV!LUPPRV,,0        ;HE DIDDLES HGYET       >
1920:                 LUPPRV,,0               ;PRANCING PONY SYSTEM
1921:                 0                       ;PATCH AREA
1922: >;END OF FTBAT
1923: 
1924: 
1925: ONCEI:         JSR ONCE
1926: SYSTHERE:      0                       ;-1 => SYSTEM IS ON THE L'SCOPE DISK
1927: 
1928: DAMESS:        ASCIZ /-JAN-/
1929: DISMON:        ASCIZ /-JAN-/           ;RPH FOR DISDATE
1930: MONPTR:        0
1931: FIXBUF:        BLOCK FIXLEN
1932: ERRYET:        -1
1933: 
1934: IFN FTSHF1K,<
1935: ↑SHFTAC:        0
1936: ↑SHFEND:        0
1937: ↑SHFJOB:        0
1938: ↑SHFBLK:        0
1939: >
1940: 
1941: TIMDAT:        0               ;<DATE>,,<TIME IN SECS>
1942: INITIM:        0               ;AS TIMDAT, TIME OF LAST RELOAD/RE-INITIALIZATION.
1943: 
1944: ; BEGINNING 2-PROCESSOR SPLIT DATA AREAS
1945: 
1946: P1DATA:
1947: SPWUUF:        0               ;SET WHEN SPACEWAR IS ACTIVE
1948: SPWTMO:        0               ;SPACEWAR TIMEOUT COUNT
1949: SPWBLO:        0               ;LOCATION OF BLOWN UP SPACEWAR JOB
1950: SPWXCT:        0               ;CONTAINS JRST 2,@UUO0 OR SOMETHING ELSE
1951: INTACT:        0
1952: INTNF:         0
1953: INTACS:        BLOCK 20
1954: INTSAC:        BLOCK 20
1955: INTDISP:       0
1956: INTSP:         0
1957: INTREQ:        0
1958: INTQUANT:      0
1959: CLKSV:         CLKSAVE
1960: CLKESV:        CLKESAVE
1961: ↑...TMP:        0
1962: APRTAC:        0
1963: APRAC1:        0
1964: APRAC2:        0
1965: APRJ:          0
1966: APRCN:         APRCON
1967: APRIN1:        0
1968: APRIN2:        0
1969: APRIN3:        0
1970: APRID:         P1PID
1971: APRCH:         APRCHL
1972: APRERR:        0               ;APR ERROR BITS ON NON-EX MEM, ETC.
1973:                                 ;SET BY APRSER, CLEARED BY CLK ROUTINE(CLOCK)
1974: APRPC:         0               ;PC WHEN APR ERROR DETECTED
1975: APRPLN←←140
1976: APRPDL:        IOWD APRPLN,APRPD
1977: APRPD:         BLOCK APRPLN
1978: ERRPLN←←200
1979: ERRPD:         IOWD ERRPLN,ERRPDL
1980: ERRPDL:        BLOCK ERRPLN
1981: DSFLAG:        0
1982: JOB:           0
1983: SJOB:          0
1984: JOBDAT:
1985: JOBADR:        0
1986: LASTPR:        0
1987: USRREL:        0
1988: 
1989: ;LOCATIONS COPIED FROM JOB DATA AREA INTO MONITOR WHEN A JOB RUNS
1990: ;THIS PREVENTS THE USER FROM CLOBBERING THEM AND MAKES IT
1991: ;EASIER FOR THE MONITOR TO LOCATE THESE QUANTITIES WHEN IT
1992: ;NEEDS TO FOR THE CURRENT JOB
1993: ;CONTENTS ARE COPIED BACK WHEN JOB BECOMES INACTIVE(SEE CLOCK)
1994: ;COMPARE WITH JOB DATA AREA(SEE JOBDAT)
1995: 
1996: USRPRT:                        ;FIRST LOC. OF PROTECTED JOB DATA
1997: USRHCU:        0               ;HIGHEST USER IO CHANNEL IN USE
1998:                                 ;0 MEANS EITHER NONE OR CHAN. 0 IN USE
1999:                                 ;NEG, MEANS SAVE-GET HAS ACTIVE IO EVEN THOUGH USRJDA
2000:                                 ;TABLE IS OVERWRITTEN BY GET.
2001:                                 ;RH=ADR. OF SAVE-GET DEVICE(USED BY ANY ACT ROUT. IN
2002:                                 ;IN CORE SHUFFLER
2003:                                 ;ONLY CHAN. ASSIGNMENTS IN USE ARE COPIED INTO
2004:                                 ;MONITOR WHEN JOB RUNS
2005: USRPC:         0               ;JOB PC WHEN SCHEDULER IS CALLED
2006: USRDDT:        0               ;RH=STARTING ADR. OF USER DDT,LH UNUSED
2007: USRJDA:        BLOCK   20      ;RH=JOB DEVICE ASSIGNMENTS (DEVICE DATA BLOCK ADDRESSES)
2008:                                 ;LH=UUOS DONE SO FAR FOR THIS CHANNEL(SEE SYSPAR)
2009:                                 ;0 MEANS NO DEVICE INITIALIZED ON THIS CHANNEL
2010: USRLO←←USRJDA
2011:                                 ; FIRST LOC CLEARED BY SETUSR ROUTINE
2012:                                 ;ON A CALL [SIXBIT /RESET/]
2013:                                 ;ALSO CLEARS USRHCU
2014: USRLO1←←USRLO+1                ; FIRST LOC+1
2015: USRHI←←.-1                     ; FIRST LOC CLEARED BY SETUSR
2016: 
2017: CHKYET:        0
2018: UUO0:          0
2019:                 JRST UUO1
2020: UUO2:          0       ;JSR HERE FOR OPCODES 100-127
2021:                 JRST UUO3
2022: UUOLOC:        0
2023: CLOCK:         POINT 36,CIPWT-1,35
2024: MONSUM:        0
2025: NULDAT:        BLOCK 140
2026: PALIVE:        0
2027: NULBAD:        0
2028: CIPWT:         BLOCK 2*JOBN
2029: USRSAV:        0               ;TEMPORARY FOR UUO HANDLER(IMPURE ROUTINE!)
2030: CLKFLG:        0               ;NON-ZERO WHEN CLK INTERRUPT FORCED FOR ANY REASON
2031: CLKS17:        0
2032: USAVPC:        0               ; SAVED PC ON ILM TRAPS
2033: CLKPDL:        BLOCK CLKPLN
2034: CLKCH:         CLKCHL
2035: OTHERID:       0               ; CONTAINS THE OTHER PROCESSOR'S IDENTIFICATION
2036: TIMEFF:        0
2037: TIMEF:         0               ;NON-ZERO FOR CLOCK INTERRUPT ON APR
2038:                                 ;SET BY APRSER, TESTED AND CLEARED BY CLK ROUTINE
2039: TIME:          0               ; TIME OF DAY IN TICKS SINCE MIDNIGHT
2040: THSDAT:        0               ;TODAY'S DATE((Y-1964)*12+M-1))*31+(D-1)
2041: UPTIME:        0
2042: INTIME:        0
2043: SCHEDF:        0               ;FORCED RESCHEDULING FLAG FOR CLK ROUTINE
2044:                                 ;USED TO FORCE RESCHEDULING WHEN JOB IS IN EXEC MODE
2045: UUOXIT:        JEN @UUO0       ;UUO EXIT INST, SOMETIMES CONO PI,PIOFF (SEE USRXIT CODE)
2046: UUOXI:         JEN @UUO0       ;BACKUP COPY FOR RESTORING ABOVE
2047: INTHLD:        0               ;FLAG TO DISABLE INTNOW (SEE USRXIT)
2048: 
2049: PDATALEN←←.-P1DATA
2050: 
2051: P2DATA:
2052:                 BLOCK PDATALEN
2053: 
2054: P1PID←←0
2055: P2PID←←PDATALEN
    ALLDAT page# 0038 next  prev
2057: SYSBEG←←.              ;HERE TO SYSEND ZEROED AT RELOAD OR INITIALIZATION
2058: ;       ↑AFOOL:         0       ;PART OF APRIL 1 HACK
2059: UUO.SA:        BLOCK 20        ;HACK TO SAVE AC'S AT THE VERY LAST UUO.
2060: ↑...TAC:        0
2061: LASTDI:        0       ;LAST DISASTER TIME
2062: LASTRE:        0       ;LAST RESTART TIME
2063: SHFWRD:        0       ;TOTAL COUNT OF WORDS SHUFFLED BY SYSTEM
2064: COMCNT:        0       ;# OF COMMANDS TYPED-IN BUT NOT DECODED.
2065:                         ;SET BY SCNSER, DECREMENTED BY COMCON
2066: HNGTIM:        0       ;HUNG DEVICE TIME COUNT CHECK FOR HUNG IO
2067:                         ;DEVICES WHEN THIS GOES TO ZERO (ONCE A SECOND)
2068: STUSER:        0       ;JOB CURRENTLY USING THE SYSTEM TAPE
2069:                         ;NEEDED SO CONTROL C WILL NOT TIE UP SYSTEM TAPE
2070: ASSLGN:        0       ;TEMP FOR ASSIGN COMMAND FOR LOGICAL NAME
2071: ASSJBN:        0       ;TEMP FOR ASSIGN COMMAND FOR JOB # OF PART MATCH DDB
2072: 
2073: APRLST:        0               ; CLOCK INTERRUPT LIST
2074: ESTINT:        0               ; -1 → GOT INTO CH7 FROM ESTOP WITH INTACT SET
2075: JBTSTS:        BLOCK   JOBN    ;JOB STATUS BITS
2076: REPEAT 0,<
2077: ↑JB2STS:        BLOCK   JOBN    ;TWO PROCESSOR INTERLOCKED STATUS BITS
2078: ↑JBTOWN:        BLOCK   JOBN    ; WHAT PROCESSOR OWNS WHICH JOB
2079: ↑JBTCSC:        BLOCK   PSYNCN
2080: >
2081: PDLCSC:        BLOCK   PSYNCN  ; PDL SETUP INTERLOCK
2082: JBTDVW:        BLOCK   JOBN    ; DDB ADDRESS OF DEVICE THIS JOB WAITS FOR
2083: JBTGSL:        BLOCK   JOBN    ; JOB'S GUARANTEED SERVICE LEVEL
2084: NJOBS:         BLOCK   JOBN    ; NUMBER OF JOBS POINTING TO THIS SEGMENT
2085: CJOBS:         BLOCK   JOBN    ; COUNT DOWN TABLE FOR SCHEDU
2086: UUOPC:         BLOCK   JOBN    ; THIS IS WHERE THE UUO-LEVEL PC IS STORED
2087: UUOOPC:        BLOCK   JOBN    ; THIS IS WHERE THE UUO PC ONE BACK IS SAVED
2088: JBTUPC:        BLOCK   JOBN    ; SAVE UUO-LEVEL PC HERE FOR DEBREAK
2089: JBTADR:
2090: JBTDAT:        BLOCK   JOBN
2091: JBTPR2:        BLOCK   JOBN    ;PEEK-POKE TABLE
2092: JBTLIN:        BLOCK   JOBN    ;TTY LINE NO. OF JOB. (=-1 IF DETACHED.)
2093: IFN FTLOGIN,<
2094: JBTPRV:        BLOCK   JOBN    ;JOB ACTIVE PRIVELEGE BITS
2095: JB2PRV:        BLOCK   JOBN    ;JOB PASSIVE PRIVELEGE BITS
2096: JBTTPV:        BLOCK   JOBN    ;JOB TEMPORARY PRIVILEGE BITS
2097: PRJPRG:        BLOCK   JOBN    ;PROJECT PROGRAMMER NAME OF JOB OWNER
2098: IFN FTDSKPPN,<
2099: DSKPPN:        BLOCK   JOBN    ;DISK ALIAS PPN
2100: >;FTDSKPPN
2101: SLRMAX←←20                     ;MAXIMUM NUMBER OF SL RESERVATIONS
2102: SLCOST:        0               ;=0,1,2 DEPENDS ON TIME OF DAY,TIME OF WEEK
2103: SLNRES:        0               ;NUMBER OF SL RESERVATIONS
2104: SLRES:         BLOCK   SLRMAX  ;TABLE OF SL RESERVATIONS
2105: >
2106: JOBNAM:        BLOCK   JOBN    ;NAME OF CURRENT PROGRAM (FOR WHO)
2107: JBTKCJ:        BLOCK   JOBN    ;KILO CORE JIFFIES USED BY THIS JOB
2108: JBTBTM:        BLOCK   JOBN    ;LOGIN TIME FOR A JOB
2109: JOBPPN:        BLOCK   JOBN    ; DIRECTORY CURRENT PGM CALLED FROM
2110: JOBCRD:        BLOCK   JOBN    ;PROGRAM'S CREATION DATE (FROM FILE RETRIEVAL)
2111: IFN FTDISK,<
2112: JBTUFD:        BLOCK   JOBN    ;LOGICAL ADDR OF USER'S UFD.
2113: CUSLOC:        0               ;SAME OF [1,3] UFD.
2114: >
2115: JOBDEV:        BLOCK   JOBN    ; DEVICE THAT JOB WAS CALLED IN FROM
2116: JOBLOG:        BLOCK   JOBN    ; LOGICAL DEVICE NAME
2117: RTIME:         BLOCK   JOBN    ; RUN TIME AT LAST "TIME" COMMAND
2118: TTIME:         BLOCK   JOBN    ;TOTAL RUN TIME
2119: FTIME:         BLOCK   JOBN    ;<DATE>,,<TIME IN SECS> WHEN JOB LAST RUN
2120: XTIME:         BLOCK   JOBN    ;RUN TIME WHEN LAST ACTIVATED OUT OF TTY INPUT WAIT
2121: JBTWAT:        BLOCK   JOBN    ; TIME WAITING FOR SYSTEM (NOT IN IOWQ OR STOPQ)
2122: JB2WAT:        BLOCK   JOBN    ; RECENTLY SAVED VALUE OF JBTWAT (FOR WHO LINE)
2123: JBTRNB:        BLOCK   JOBN    ;CPU TIME USED SINCE JOB'S LAST PRIORITY CALCULATION
2124: IFN FTSWAP,<
2125: STIME:         BLOCK   JOBN    ; SET TO -1 WHEN CORE IMAGE IS MODIFIED
2126: >
2127: GLOBAL TTPLEN
2128: IFN FTTTYBUG,<  TTCBCK:        BLOCK   3       >;TEMP FOR COMCNT BUG TRAP
2129: ASTAB:         BLOCK   DDNUM+DPYNUM    ;MAPPING TABLE FOR AUDIO SWITCH
2130: ASBTAB:        BLOCK   DDNUM+DPYNUM    ;BEEP DURATION
2131: PAGNOW:        0               ;-1 => PAGING NOW
2132: TTYTAB:        BLOCK   TTPLEN
2133: TPYTAB:        BLOCK   PTYNUM
2134: PTYTAB:        BLOCK   PTYNUM
2135: CRKYET:        0
2136: RSTBEG←←.                      ;THIS AREA CLEARED ON RESTARTS
2137: IFN FTDISK,<
2138: JBTIOP:        BLOCK   JOBN    ;IO PUSH/POP POINTERS
2139: >
2140: JBTSIN:        BLOCK   JOBN    ;SWAPIN LIST FOR COMMAND DECODER, INTS, ETC.
2141: SAVSAI:        BLOCK   JOBN
2142: JBTDTS:        BLOCK   JOBN    ; LIST OF SEGMENTS THIS JOB HAS DETACHED
2143: JBTGLU:        BLOCK   JOBN    ;NON-ZERO GLUES JOB IN PLACE IN CORE.
2144: JBTFS:         BLOCK   JOBN    ; TEMPORARY FREE STORAGE
2145: JBTMAIL:       BLOCK   JOBN    ;PTR. TO LETTER ADDRESSED TO JOB.
2146: JBTTCR:        BLOCK JOBN      ;PNTR TO TMPCOR FILES
2147: JBTMSK:        BLOCK   JOBN    ;NEW STYLE INTERRUPT SYSTEM MASKS
2148: JBTIEN:        BLOCK   JOBN    ; INTERRUPT ENABLINGS
2149: JBTIRQ:        BLOCK   JOBN    ; REQUESTS PENDING
2150: JBTWKM:        BLOCK   JOBN    ; TELLS WHICH BITS CAUSE WAKEUP
2151: JBTIIP:        BLOCK   JOBN    ; INTERRUPT IN PROGRESS
2152: INTDTM:        BLOCK   JOBN    ; DATUM OF INTERUPT
2153: UUOPTR:        BLOCK JOBN      ;PNTR TO UUO SIMULATOR TABLE
2154: RSTEND←←.                      ;END OF AREA CLEARED ON RESTARTS
2155: IFN FTSTAT, <
2156: STATS:         BLOCK   STATLEN ; STATISTICS GATHERING SERVICE
2157: STATNUM:       0               ; NUMBER OF TIMES WE'VE WRAPPED AROUND
2158: >
2159: JOBNM1:        0               ; MAXIMUM JOB NUMBER
2160: 
2161: ; WHO LINE DATA STORAGE
2162: 
2163: LASTUP:        0               ; NEGATIVE UPTIME WHEN SYSTEM WHO LINE LAST DONE
2164: LASTNL:        0               ; RECENT VALUE OF NEGATIVE RUN TIME FOR NULL JOB
2165: JBSRUN:        BLOCK   2       ; BITS FOR JOBS THAT HAVE BEEN RUN LATELY
2166: WHONXT:        0               ; NUMBER OF THE III WHOSE WHO LINE WAS DONE LAST
2167: WHDDNX:        0               ; NUMBER OF NEXT DATA DISK CHANNEL TO GET WHO LINE
2168: WHOPTR:        0               ; POINTER TO THE DD THAT WAS DONE LAST (SEE DPYSER&WHOQUE)
2169: WHODAT:        0               ; DATE ON CURRENT WHO LINE
2170: FREWAT:        0               ; FREE STORAGE RELEASE WAIT LIST
2171: FRETAB:        BLOCK DPYNUM+DDNUM ; FREE STORAGE POINTER FOR EACH WHO LINE
2172: T15CNT:        0               ;COUNT FOR 1/4 TH SECOND CLOCK
2173: DKBCNT:        0               ;WHEN THIS GOES NEGATIVE, DKB HARDWARE
2174:                                 ;  IS CHECKED (CODE IS IN CLKSER).
2175: NDDXOL:        0               ;OLD VALUE OF NDDXCT
2176: NDDLOL:        0               ;OLD VALUE OF NDDLCT
2177: NDSTAT:        0               ;COUNTS DOWN TO RUN FROB IN 5 SECONDS.
2178: SYSEND←←.
2179: IFN FTSTAT,<
2180: STATPTR:       POINT 18,STATS  ; BYTE POINTER TO STATISTICS TABLE
2181: >
2182: AUTOSYNC:      0
2183: SYSTOP:        0               ;FIRST LOCATION USED BY USER PROGRAMS.
2184: 
2185: ;;ADDRESS BREAK CRAP . . .
2186: BRKMAX←←20                     ; MAXIMUM NUMBER OF LEGAL PCS
2187: BRKTAC:        0
2188: BRKAC1:        0
2189: BRKNUM:        0               ; CURRENT NUMBER OF LEGAL PCS
2190: BRKTAB:        BLOCK BRKMAX    ; PUT GOOD PCS HERE
2191: 
2192: ; DISASTER MESSAGE BUFFERS AND STUFF
2193: 
2194: DISLEN←←400
2195: DISBUF:        BLOCK   DISLEN
2196: DISPTR:        POINT   7,DISBUF
2197: DISOPT:        POINT   7,DISBUF
2198: DISFLAG:       0
2199: DISCTR:        5*DISLEN
2200: 
2201: ; ACCUMULATOR SAVE ROUTINE FOR CLKING
2202: 
2203: CLKSAVE:
2204:         0
2205:         SKIPN 17,JOBDAT+P1PID   ; CURRENT JOB DATA AREA
2206:         MOVEI 17,NULDAT+P1PID   ; NO, USE NULL JOB'S
2207:         MOVEM 16,JOBD16(17)
2208:         MOVEI 16,JOBDAC(17)
2209:         BLT 16,JOBD15(17)
2210:         MOVE TAC,CLKS17
2211:         MOVEM TAC,JOBD17(17)
2212:         MOVE PID,[P1PID]
2213:         JRST @CLKSAVE
2214: 
2215: CL2SAVE:
2216:         0
2217:         SKIPN 17,JOBDAT+P2PID   ; CURRENT JOB DATA AREA
2218:         MOVEI 17,NULDAT+P2PID   ; NO, USE NULL JOB'S
2219:         MOVEM 16,JOBD16(17)
2220:         MOVEI 16,JOBDAC(17)
2221:         BLT 16,JOBD15(17)
2222:         MOVE TAC,CLKS17
2223:         MOVEM TAC,JOBD17(17)
2224:         MOVE PID,[P2PID]
2225:         JRST @CL2SAVE
2226: 
2227: CLKESAVE:
2228:         0
2229:         HRRZ 17,JOBADR+P1PID
2230:         ADDI 17,JOBDAC
2231:         MOVEM 16,16(17)
2232:         HRRZI 16,15(17)
2233:         BLT 17,(16)
2234:         MOVE PID,[P1PID]
2235:         JRST CLKES1
2236: 
2237: CL2ESAVE:
2238:         0
2239:         HRRZ 17,JOBADR+P2PID
2240:         ADDI 17,JOBDAC
2241:         MOVEM 16,16(17)
2242:         HRRZI 16,15(17)
2243:         BLT 17,(16)
2244:         MOVE PID,[P2PID]
2245: CLKES1: MOVE TAC,CLKS17(PID)
2246:         MOVE PROG,JOBDAT(PID)
2247:         MOVEM TAC,JOBD17(PROG)
2248:         MOVE J,JOB(PID)
2249:         SKIPN TAC,USAVPC(PID)
2250:         MOVE TAC,@CLKCH(PID)
2251:         SETZM USAVPC(PID)
2252:         TLNN TAC,USRMOD         ; IS PC IN EXEC?
2253:         JRST CLKES2             ; YES, CAN'T SAVE HIS PC.
2254:         MOVEM TAC,JOBPC(PROG)
2255:         CAMN J,SJOB(PID)
2256:         MOVEM TAC,USRPC(PID)
2257: CLKES2: MOVE P,INTSP
2258:         MOVE TAC,@CLKESV(PID)
2259:         JRST @TAC
2260: 
2261: 
2262:         BEND APRDAT
    ALLDAT page# 0039 next  prev
2264: ;       DATA AREA FOR PARITY SERVICE
2265: PARBLK: 0                       ;SET BY CORE ROUTINES - OLD LOC OF SHUFFLED JOB
2266: PARSJB: 0                       ;SAVE JOB NUMBER OF JOB BEING SHUFFLED.
2267: PARSJN: 0                       ;FLAG WITH JOB NUMBER OF SHUFFLED JOB.
2268: PARFLG: 0                       ;SET BY P2 WHEN IT HAS ERROR
2269: P2RFLG: 0                       ;SET BY P1 WHEN IT SEES PARFLG
2270: P2SA:   0                       ;PLACE FOR P2RINT TO SAVE AN AC
2271: ERRLOC: -1                      ;IF > 0 THEN LAST LOC SEEN WITH BAD PARITY
2272: RERLOC: 0                       ;RELATIVE ERROR LOCATION.
2273: PARPSA: 0                       ;SAVE P HERE WHILE WE USE APRPDL
2274: ERRPC:  -1                      ;PC AT TIME OF ERROR
2275: 
2276: SYSERR: 0                       ;LEFT SIDE = -1 WHEN PARITY ERROR IS FOUND
2277:                                 ;IN THE SYSTEM (OR INDETERMINATE)
2278:                                 ;RIGHT SIDE = APR CONI BITS TO PRESERVE 
2279:                                 ;STATE OF SYS WR REF KLUGE.
2280: 
2281: LASLOS: 0                       ;SET TO JOB NUMBER OF LAST JOB THAT LOST
2282: ERRJOB: BLOCK   2               ;BIT TABLE OF JOBS THAT HAVE LOST DURING
2283:                                 ;THIS PASS THROUGH CORE.
2284: 
    ALLDAT page# 0040 next  prev
2286: ; STATISTICS COUNTERS
2287: ;  CAUTION:  THE RELATIVE ORDER OF THESE COUNTERS SHOULD NOT BE CHANGED,
2288: ;    BECAUSE THE PROGRAM MONUSE THINKS IT KNOWS WHERE THINGS ARE
2289: 
2290: IFN FTHG, <     XWD HGXMAX,HGNMAX;STBEG-2 CONTAINS # OF EACH KIND OF HG CNTR
2291:                 HGCNTS  ;LOCATION STBEG-1 POINTS TO HISTOGRAM COUNTERS!  >
2292: STBEG←←.
2293: NCORCALLS:      0       ; NUMBER OF CALLS ON THE CORE ROUTINES
2294: NFSGETS:        0       ; NUMBER OF TIMES FREE STORAGE IS GOTTEN
2295: NFSGIVES:       0       ; NUMBER OF TIMES FREE STORAGE IS RELEASED
2296: NCOMS:          0       ; NUMBER OF COMMANDS THAT HAVE BEEN DISPATCHED TO
2297: NDLYCMS:        0       ; NUMBER OF COMMANDS THAT HAVE BEEN DELAYED
2298: NUUOS:          0       ; NUMBER OF UUOS
2299: NSCHEDS:        0       ; NUMBER OF TIMES WE HAVE ENTERED THE JOB SCHEDULING LOOP
2300: NQXFERS:        0       ; NUMBER OF QUEUE TRANSFERS
2301: NOUTSWPS:       0       ; NUMBER OF SWAPOUTS - 10
2302: NINSWPS:        0       ; NUMBER OF SWAPINS
2303: NDDQUE:         0       ; NUMBER OF TASKS CREATED FOR THE DATA DISC QUEUE
2304: NNUUOS:         0       ; NUMBER OF NEW UUO DISPATCHES
2305: NFSWAITS:       0       ; NUMBER OF TIMES WE HAD TO WAIT FOR FREE STORAGE
2306: NFSLP1:         0       ; NUMBER OF LOOPS (TYPE 1) IN FSGET
2307: NNULLJS:        0       ; NUMBER OF SCHEDULINGS THAT CHOSE THE NULL JOB
2308: NJSWITCHES:     0       ; NUMBER OF TIMES JOBS WERE SWITCHED
2309: NWSCHEDS:       0       ; NUMBER OF TIMES JOBS TURN THEMSELVES OFF - 20
2310: NTMOS:          0       ; NUMBER OF TIMES JOBS GET TIMED OUT
2311: NJRNULLS:       0       ; NUMBER OF TIMES A JOB IS RUNNABLE WHILE THE NULL JOB IS RUNNING
2312: NPWAITS:        0       ; NUMBER OF FAILURES IN SYNCHRONIZATION
2313: NLERRS:         0       ; NUMBER OF TIMES THROUGH FININ1 WITH ERRORS
2314: NSAERR:         0       ; NUMBER OF TIMES THROUGH FININ1 WITH SUCCESS AFTER ERROR RETRIES
2315: NLREQS:         0       ; NUMBER OF TRANSFERS
2316: NLRERS:         0       ; NUMBER OF TRANSFERS PLUS NUMBER OF ERROR RETRIES
2317: NFSGFA:         0       ;NUMBER OF FAILURES FROM FSGET - 30
2318: NABFE:          0       ; NUMBER OF TIMES WE ADVANCED AN OUTPUT BUFFER
2319: NABFF:          0       ; NUMBER OF TIMES WE ADVANCED AN INPUT BUFFER
2320: NFSLP2:         0       ;NUMBER OF LOOPS (TYPE 2) IN FSGET
2321: NPUSHD:         0       ;MAXIMUM PUSH DOWN DEPTH USED IN A UUO PDL.
2322: NDDFRM:         0       ; NUMBER OF FRAMES CREATED FOR THE DATA DISC QUEUE
2323: NDDLCT:         0       ;-(NUMBER OF LINES SENT TO DD)
2324: NDDLMX:         0       ;MAX COUNT FOR 5 SECONDS
2325: NDDXCT:         0       ;NUMBER OF ENTRIES MADE TO DD QUEUE.-40
2326: NDDXMX:         0       ;MAX COUNT FOR 5 SECONDS
2327: NDDL1C:         0       ;COUNT OF 1 AND 2 LINE TRANSFERS TO DD.
2328: NIOTS:         0       ;HOW MANY NEW UUOS (700-777) HAVE BEEN CALLED
2329: NSCALL:        0       ;HOW MANY STANFORD CALLIS HAVE BEEN CALLED
2330: STEND2 ←← .-1           ;END OF STATISTICS SECTION (FOR *SPY*)
2331: IFN FTHG, <
2332: HGNMAX ←← 40            ;NUMBER OF HISTOGRAM COUNTERS
2333: HGXMAX ←← 1             ;NUMBER OF "EXTRA" COUNTERS
2334: HGSET:          0       ;RESET VALUE FOR HGYET
2335: HGYET:          0
2336: HGCNTS: BLOCK   HGNMAX  ;HISTOGRAM COUNTERS - INCREMENTED IN HG ROUTINE
2337:         BLOCK   HGXMAX  ;EXTRA COUNTERS - NOT INCREMENTED IN HG ROUTINE
2338: HGCH2.-1             ;CH2 (DISK XFER) ACTIVE TIME (AN "EXTRA" COUNTER)
2339: HGCH6:          0       ;NUMBER OF TIMES CH5 ENTERED WITH CH6 ACTIVE
2340:                         ;IF HGCH6 ISN'T INCREMENTED, THEN ONE OF NEXT 4 IS:
2341: HGSYS:          0       ;# OF OCCURRENCES OF ¬(USRMOD) ∧  (CH7 ACTIVE)
2342: HGUSR:          0       ;# OF OCCURRENCES OF  (USRMOD) ∧ ¬(CH7 ACTIVE)
2343: HGUUO:          0       ;# OF OCCURRENCES OF ¬(USRMOD) ∧ ¬(CH7 ACTIVE)
2344: HGSPW:          0       ;# OF OCCURRENCES OF  (USRMOD) ∧  (CH7 ACTIVE)
2345: HGNULL:         0       ;NUMBER OF TIMES NULL JOB RUNNING ∧ ∃ JOB WAITING
2346: HGIDLE:         0       ;NUMBER OF TIMES NULL JOB RUNNING W/ EMPTY RUNQ
2347: HGCODE:         0       ;VARIOUS CLKINT SUBROUTINES SET THIS VARIOUSLY
2348:         >
2349: STEND←←.-1              ;END OF STATISTICS SECTION
 EOF: ALLDAT end-of-file. cnt=39